]> Creatis software - creaContours.git/blob - install/CMakeLists.txt
72724974490525126c7f3411ee91241b11d24890
[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
47
48 #SET(CPACK_PACKAGE_INSTALL_DIRECTORY "CreaTools\\\\creaContours-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
49
50
51
52 #IF (BUILD_BBTK_PACKAGE_creaContours)
53 #
54 #  SET(CPACK_PACKAGE_INSTALL_DIRECTORY "CreaTools\\\\bbtk-${BBTK_VERSION}")
55 #  IF(WIN32)
56 #    SET(CMAKE_INSTALL_PREFIX C:/CreaTools/bbtk-${BBTK_VERSION})
57 #  ENDIF(WIN32)
58
59 #ELSE (BUILD_BBTK_PACKAGE_creaContours)
60 IF(WIN32)
61         SET(CPACK_PACKAGE_INSTALL_DIRECTORY "CreaTools\\\\creaContours-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
62 ELSE(WIN32)
63         SET(CPACK_PACKAGE_INSTALL_DIRECTORY "CreaTools/creaContours-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
64 ENDIF(WIN32)
65   
66   IF(WIN32)
67     SET(CMAKE_INSTALL_PREFIX C:/CreaTools/creaContours)
68   ENDIF(WIN32)
69
70
71 #ENDIF (BUILD_BBTK_PACKAGE_creaContours)
72
73
74
75 IF(WIN32 AND NOT UNIX)
76   # There is a bug in NSI that does not handle full unix paths properly. Make
77   # sure there is at least one set of four (4) backlasshes.
78 #EED  SET(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/kernel/install/gnome/bbi-icon2.bmp")
79 #  SET(CPACK_NSIS_INSTALLED_ICON_NAME "bin/BBI_EXE.exe")
80   SET(CPACK_NSIS_DISPLAY_NAME "creaContours")
81   SET(CPACK_NSIS_HELP_LINK "http://www.creatis.insa-lyon.fr/creatools/creaContours")
82   SET(CPACK_NSIS_URL_INFO_ABOUT "http://www.creatis.insa-lyon.fr/creatools/creaContours")
83   SET(CPACK_NSIS_CONTACT "info-dev@creatis.insa-lyon.fr")
84   SET(CPACK_NSIS_MODIFY_PATH ON)
85 ELSE(WIN32 AND NOT UNIX)
86 #  SET(CPACK_STRIP_FILES "bin/bbi")
87   SET(CPACK_SOURCE_STRIP_FILES "")
88 ENDIF(WIN32 AND NOT UNIX)
89 SET(CPACK_PACKAGE_EXECUTABLES "wxContourGUIExample" "creaContours")
90   
91
92 INCLUDE(CPack)
93
94
95 # Aditional INSTALL for CPACK mecanism.
96 IF (WIN32)
97
98 #  INSTALL( FILES ${PROJECT_SOURCE_DIR}/win32/sqlite3.dll DESTINATION bin ) 
99
100 ENDIF (WIN32)
101
102
103
104
105
106
107
108 IF(EXWIN32)
109
110 OPTION(BBTK_STANDALONE_INSTALLER "Install and add to installer all dlls needed, including from external toolkits (wx,itk,vtk)?" OFF)
111
112 IF(BBTK_STANDALONE_INSTALLER)
113   STRING(REGEX REPLACE "\\\\" "/" WINDIR "$ENV{WINDIR}")
114   INSTALL(   FILES ${WINDIR}/system32/msvcp71d.dll                              DESTINATION bin/ )
115   INSTALL(   FILES ${WINDIR}/system32/msvcr71d.dll                              DESTINATION bin/ )
116
117   IF(USE_VTK)
118     SET(VTK_BIN_DIR ${VTK_DIR}/../../bin )
119
120     FILE(GLOB LST_FILE_VTKDLL "${VTK_BIN_DIR}/*.dll")
121     FOREACH( iLST  ${LST_FILE_VTKDLL} )
122        INSTALL( 
123          FILES ${iLST}
124          DESTINATION bin/
125        )
126     ENDFOREACH(iLST)
127   ENDIF(USE_VTK)
128     
129   IF(USE_ITK)
130     INSTALL(   FILES ${ITK_DIR}/bin/ITKCommon.dll       DESTINATION bin/ )
131   ENDIF(USE_ITK)
132
133   IF(USE_WXWIDGETS)
134     INSTALL(   FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxmsw28d_xrc_vc_custom.dll                        DESTINATION bin/ )
135     INSTALL(   FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxmsw28d_richtext_vc_custom.dll           DESTINATION bin/ )
136     INSTALL(   FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxmsw28d_qa_vc_custom.dll                         DESTINATION bin/ )
137     INSTALL(   FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxmsw28d_media_vc_custom.dll              DESTINATION bin/ )
138     INSTALL(   FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxmsw28d_html_vc_custom.dll               DESTINATION bin/ )
139     INSTALL(   FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxmsw28d_gl_vc_custom.dll                         DESTINATION bin/ )
140     INSTALL(   FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxmsw28d_core_vc_custom.dll               DESTINATION bin/ )
141     INSTALL(   FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxmsw28d_aui_vc_custom.dll                        DESTINATION bin/ )
142     INSTALL(   FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxmsw28d_adv_vc_custom.dll                        DESTINATION bin/ )
143     INSTALL(   FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxbase28d_xml_vc_custom.dll               DESTINATION bin/ )
144     INSTALL(   FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxbase28d_vc_custom.dll                           DESTINATION bin/ )
145     INSTALL(   FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxbase28d_odbc_vc_custom.dll              DESTINATION bin/ )
146     INSTALL(   FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxbase28d_net_vc_custom.dll                       DESTINATION bin/ )
147   ENDIF(USE_WXWIDGETS)
148 ENDIF(BBTK_STANDALONE_INSTALLER)
149
150 ENDIF(EXWIN32)