]> Creatis software - creaContours.git/blob - install/CMakeLists.txt
e630799b990fcb3d3824ada5b4b337b911d384ee
[creaContours.git] / install / CMakeLists.txt
1
2
3
4
5
6 #-----------------------------------------------------------------------------
7 # CPACK+NSIS PACKAGING
8 #-----------------------------------------------------------------------------
9
10 #---Documentation-------------
11 #http://www.cmake.org/Wiki/CMake:Packaging_With_CPack
12 #http://www.cmake.org/Wiki/CMake:CPackConfiguration
13 #http://www.cmake.org/Wiki/CMake:Install_Commands
14
15
16 INCLUDE(InstallRequiredSystemLibraries)
17
18 SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "creaContours - CREATIS-LRMN")
19 SET(CPACK_PACKAGE_VENDOR "CREATIS-LRMN")
20 SET(CPACK_PACKAGE_DESCRIPTION_FILE "${PROJECT_SOURCE_DIR}/README.txt")
21 SET(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE.txt")
22 SET(CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_MAJOR_VERSION})
23 SET(CPACK_PACKAGE_VERSION_MINOR ${PROJECT_MINOR_VERSION})
24 SET(CPACK_PACKAGE_VERSION_PATCH ${PROJECT_BUILD_VERSION})
25
26
27
28 SET(DATA_DIR ${PROJECT_SOURCE_DIR}/data )
29 FILE(GLOB DATA_FILES "${DATA_DIR}/*.*")
30 FOREACH( iLST  ${DATA_FILES} )
31    INSTALL( 
32          FILES ${iLST}
33          DESTINATION bin/data
34    )
35 ENDFOREACH(iLST)
36 SET(DATA_DIR ${PROJECT_SOURCE_DIR}/data/Icons )
37 FILE(GLOB DATA_FILES "${DATA_DIR}/*.*")
38 FOREACH( iLST  ${DATA_FILES} )
39    INSTALL( 
40          FILES ${iLST}
41          DESTINATION bin/data/Icons
42    )
43 ENDFOREACH(iLST)
44
45
46 #SET(CPACK_PACKAGE_INSTALL_DIRECTORY "CreaTools\\\\creaContours-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
47
48
49
50 #IF (BUILD_BBTK_PACKAGE_creaContours)
51 #
52 #  SET(CPACK_PACKAGE_INSTALL_DIRECTORY "CreaTools\\\\bbtk-${BBTK_VERSION}")
53 #  IF(WIN32)
54 #    SET(CMAKE_INSTALL_PREFIX C:/CreaTools/bbtk-${BBTK_VERSION})
55 #  ENDIF(WIN32)
56
57 #ELSE (BUILD_BBTK_PACKAGE_creaContours)
58
59   SET(CPACK_PACKAGE_INSTALL_DIRECTORY "CreaTools\\\\creaContours-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
60   IF(WIN32)
61     SET(CMAKE_INSTALL_PREFIX C:/CreaTools/creaContours)
62   ENDIF(WIN32)
63
64
65 #ENDIF (BUILD_BBTK_PACKAGE_creaContours)
66
67
68
69 IF(WIN32 AND NOT UNIX)
70   # There is a bug in NSI that does not handle full unix paths properly. Make
71   # sure there is at least one set of four (4) backlasshes.
72 #EED  SET(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/kernel/install/gnome/bbi-icon2.bmp")
73 #  SET(CPACK_NSIS_INSTALLED_ICON_NAME "bin/BBI_EXE.exe")
74   SET(CPACK_NSIS_DISPLAY_NAME "creaContours")
75   SET(CPACK_NSIS_HELP_LINK "http://www.creatis.insa-lyon.fr/creatools/creaContours")
76   SET(CPACK_NSIS_URL_INFO_ABOUT "http://www.creatis.insa-lyon.fr/creatools/creaContours")
77   SET(CPACK_NSIS_CONTACT "info-dev@creatis.insa-lyon.fr")
78   SET(CPACK_NSIS_MODIFY_PATH ON)
79 ELSE(WIN32 AND NOT UNIX)
80 #  SET(CPACK_STRIP_FILES "bin/bbi")
81   SET(CPACK_SOURCE_STRIP_FILES "")
82 ENDIF(WIN32 AND NOT UNIX)
83 SET(CPACK_PACKAGE_EXECUTABLES "wxContourGUIExample" "creaContours")
84   
85
86 INCLUDE(CPack)
87
88
89 # Aditional INSTALL for CPACK mecanism.
90 IF (WIN32)
91
92 #  INSTALL( FILES ${PROJECT_SOURCE_DIR}/win32/sqlite3.dll DESTINATION bin ) 
93
94 ENDIF (WIN32)
95
96
97
98
99
100
101
102 IF(EXWIN32)
103
104 OPTION(BBTK_STANDALONE_INSTALLER "Install and add to installer all dlls needed, including from external toolkits (wx,itk,vtk)?" OFF)
105
106 IF(BBTK_STANDALONE_INSTALLER)
107   STRING(REGEX REPLACE "\\\\" "/" WINDIR "$ENV{WINDIR}")
108   INSTALL(   FILES ${WINDIR}/system32/msvcp71d.dll                              DESTINATION bin/ )
109   INSTALL(   FILES ${WINDIR}/system32/msvcr71d.dll                              DESTINATION bin/ )
110
111   IF(USE_VTK)
112     SET(VTK_BIN_DIR ${VTK_DIR}/../../bin )
113
114     FILE(GLOB LST_FILE_VTKDLL "${VTK_BIN_DIR}/*.dll")
115     FOREACH( iLST  ${LST_FILE_VTKDLL} )
116        INSTALL( 
117          FILES ${iLST}
118          DESTINATION bin/
119        )
120     ENDFOREACH(iLST)
121   ENDIF(USE_VTK)
122     
123   IF(USE_ITK)
124     INSTALL(   FILES ${ITK_DIR}/bin/ITKCommon.dll       DESTINATION bin/ )
125   ENDIF(USE_ITK)
126
127   IF(USE_WXWIDGETS)
128     INSTALL(   FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxmsw28d_xrc_vc_custom.dll                        DESTINATION bin/ )
129     INSTALL(   FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxmsw28d_richtext_vc_custom.dll           DESTINATION bin/ )
130     INSTALL(   FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxmsw28d_qa_vc_custom.dll                         DESTINATION bin/ )
131     INSTALL(   FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxmsw28d_media_vc_custom.dll              DESTINATION bin/ )
132     INSTALL(   FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxmsw28d_html_vc_custom.dll               DESTINATION bin/ )
133     INSTALL(   FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxmsw28d_gl_vc_custom.dll                         DESTINATION bin/ )
134     INSTALL(   FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxmsw28d_core_vc_custom.dll               DESTINATION bin/ )
135     INSTALL(   FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxmsw28d_aui_vc_custom.dll                        DESTINATION bin/ )
136     INSTALL(   FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxmsw28d_adv_vc_custom.dll                        DESTINATION bin/ )
137     INSTALL(   FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxbase28d_xml_vc_custom.dll               DESTINATION bin/ )
138     INSTALL(   FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxbase28d_vc_custom.dll                           DESTINATION bin/ )
139     INSTALL(   FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxbase28d_odbc_vc_custom.dll              DESTINATION bin/ )
140     INSTALL(   FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxbase28d_net_vc_custom.dll                       DESTINATION bin/ )
141   ENDIF(USE_WXWIDGETS)
142 ENDIF(BBTK_STANDALONE_INSTALLER)
143
144 ENDIF(EXWIN32)