6 #-----------------------------------------------------------------------------
8 #-----------------------------------------------------------------------------
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
16 INCLUDE(InstallRequiredSystemLibraries)
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})
28 #SET(CPACK_PACKAGE_INSTALL_DIRECTORY "CreaTools\\\\creaEnvironment-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
32 #IF (BUILD_BBTK_PACKAGE_creaEnvironment)
34 # SET(CPACK_PACKAGE_INSTALL_DIRECTORY "CreaTools\\\\bbtk-${BBTK_VERSION}")
36 # SET(CMAKE_INSTALL_PREFIX C:/CreaTools/bbtk-${BBTK_VERSION})
39 #ELSE (BUILD_BBTK_PACKAGE_creaEnvironment)
41 SET(CPACK_PACKAGE_INSTALL_DIRECTORY "CreaTools\\\\creaEnvironment-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
43 SET(CMAKE_INSTALL_PREFIX C:/CreaTools/creaEnvironment)
47 #ENDIF (BUILD_BBTK_PACKAGE_creaEnvironment)
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)
64 # SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "MessageBox MB_OK 'nnnn eeeeeeed'")
65 SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "WriteRegStr HKLM 'SYSTEM\\\\CurrentControlSet\\\\Control\\\\Session Manager\\\\Environment' 'xxEED' 'upspppppEED'")
66 # SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 'STR:Environment' /TIMEOUT=5000")
69 # WriteRegStr HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "xxEED" "upslllllEED"
70 # SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000
74 ELSE(WIN32 AND NOT UNIX)
75 # SET(CPACK_STRIP_FILES "bin/bbi")
76 SET(CPACK_SOURCE_STRIP_FILES "")
77 ENDIF(WIN32 AND NOT UNIX)
78 #SET(CPACK_PACKAGE_EXECUTABLES "TestWxGimmickDialog" "Gimmick!")
84 # Aditional INSTALL for CPACK mecanism.
87 # INSTALL( FILES ${PROJECT_SOURCE_DIR}/win32/sqlite3.dll DESTINATION bin )
99 OPTION(BBTK_STANDALONE_INSTALLER "Install and add to installer all dlls needed, including from external toolkits (wx,itk,vtk)?" OFF)
101 IF(BBTK_STANDALONE_INSTALLER)
102 STRING(REGEX REPLACE "\\\\" "/" WINDIR "$ENV{WINDIR}")
103 INSTALL( FILES ${WINDIR}/system32/msvcp71d.dll DESTINATION bin/ )
104 INSTALL( FILES ${WINDIR}/system32/msvcr71d.dll DESTINATION bin/ )
107 SET(VTK_BIN_DIR ${VTK_DIR}/../../bin )
109 FILE(GLOB LST_FILE_VTKDLL "${VTK_BIN_DIR}/*.dll")
110 FOREACH( iLST ${LST_FILE_VTKDLL} )
119 INSTALL( FILES ${ITK_DIR}/bin/ITKCommon.dll DESTINATION bin/ )
123 INSTALL( FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxmsw28d_xrc_vc_custom.dll DESTINATION bin/ )
124 INSTALL( FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxmsw28d_richtext_vc_custom.dll DESTINATION bin/ )
125 INSTALL( FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxmsw28d_qa_vc_custom.dll DESTINATION bin/ )
126 INSTALL( FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxmsw28d_media_vc_custom.dll DESTINATION bin/ )
127 INSTALL( FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxmsw28d_html_vc_custom.dll DESTINATION bin/ )
128 INSTALL( FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxmsw28d_gl_vc_custom.dll DESTINATION bin/ )
129 INSTALL( FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxmsw28d_core_vc_custom.dll DESTINATION bin/ )
130 INSTALL( FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxmsw28d_aui_vc_custom.dll DESTINATION bin/ )
131 INSTALL( FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxmsw28d_adv_vc_custom.dll DESTINATION bin/ )
132 INSTALL( FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxbase28d_xml_vc_custom.dll DESTINATION bin/ )
133 INSTALL( FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxbase28d_vc_custom.dll DESTINATION bin/ )
134 INSTALL( FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxbase28d_odbc_vc_custom.dll DESTINATION bin/ )
135 INSTALL( FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxbase28d_net_vc_custom.dll DESTINATION bin/ )
137 ENDIF(BBTK_STANDALONE_INSTALLER)