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)
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!")
71 # Aditional INSTALL for CPACK mecanism.
74 # INSTALL( FILES ${PROJECT_SOURCE_DIR}/win32/sqlite3.dll DESTINATION bin )
86 OPTION(BBTK_STANDALONE_INSTALLER "Install and add to installer all dlls needed, including from external toolkits (wx,itk,vtk)?" OFF)
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/ )
94 SET(VTK_BIN_DIR ${VTK_DIR}/../../bin )
96 FILE(GLOB LST_FILE_VTKDLL "${VTK_BIN_DIR}/*.dll")
97 FOREACH( iLST ${LST_FILE_VTKDLL} )
106 INSTALL( FILES ${ITK_DIR}/bin/ITKCommon.dll DESTINATION bin/ )
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/ )
124 ENDIF(BBTK_STANDALONE_INSTALLER)