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