]> Creatis software - bbtk.git/blob - kernel/install/cpack/CMakeLists.txt
Add some commented out code (as exemples for newbees)
[bbtk.git] / kernel / install / cpack / CMakeLists.txt
1
2 #-----------------------------------------------------------------------------
3 IF(WIN32)
4         SET(CMAKE_INSTALL_PREFIX C:/CreaTools/bbtk)
5 ENDIF(WIN32)
6 SET(BBTK_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
7 #-----------------------------------------------------------------------------
8
9 #---Documentation-------------
10 #http://www.cmake.org/Wiki/CMake:Packaging_With_CPack
11 #http://www.cmake.org/Wiki/CMake:CPackConfiguration
12 #http://www.cmake.org/Wiki/CMake:Install_Commands
13
14
15 INCLUDE(InstallRequiredSystemLibraries)
16
17 SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "The Black Box Toolkit (bbtk) - CREATIS-LRMN")
18 SET(CPACK_PACKAGE_VENDOR "CREATIS-LRMN")
19 SET(CPACK_PACKAGE_DESCRIPTION_FILE "${PROJECT_SOURCE_DIR}/README.txt")
20 SET(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE.txt")
21 SET(CPACK_PACKAGE_VERSION_MAJOR ${BBTK_MAJOR_VERSION})
22 SET(CPACK_PACKAGE_VERSION_MINOR ${BBTK_MINOR_VERSION})
23 SET(CPACK_PACKAGE_VERSION_PATCH ${BBTK_BUILD_VERSION})
24   # There is a bug in NSI that does not handle full unix paths properly. Make
25   # sure there is at least one set of four (4) backlasshes.
26 SET(CPACK_PACKAGE_INSTALL_DIRECTORY "CreaTools\\\\bbtk-${BBTK_MAJOR_VERSION}.${BBTK_MINOR_VERSION}.${BBTK_BUILD_VERSION}")
27 #SET(CPACK_SOURCE_PACKAGE_FILE_NAME "bbtk-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
28 IF(WIN32 AND NOT UNIX)
29 #EED  SET(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/kernel/install/gnome/bbi-icon2.bmp")
30   SET(CPACK_NSIS_INSTALLED_ICON_NAME "bin/BBI_EXE.exe")
31   SET(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY}")
32   SET(CPACK_NSIS_HELP_LINK "http://www.creatis.insa-lyon.fr/creatools/bbtk")
33   SET(CPACK_NSIS_URL_INFO_ABOUT "http://www.creatis.insa-lyon.fr/creatools/bbtk")
34   SET(CPACK_NSIS_CONTACT "info-dev@creatis.insa-lyon.fr")
35   SET(CPACK_NSIS_MODIFY_PATH ON)
36 ELSE(WIN32 AND NOT UNIX)
37   SET(CPACK_STRIP_FILES "bin/bbi")
38   SET(CPACK_SOURCE_STRIP_FILES "")
39 ENDIF(WIN32 AND NOT UNIX)
40 SET(CPACK_PACKAGE_EXECUTABLES "bbStudio" "bbStudio" "bbPackageBrowser" "bbPackageBrowser" "bbi" "bbInterpreter" "bbRegeneratePackageDoc" "Regenerate packages doc" "bbRegenerateBoxesLists" "Regenerate boxes lists")
41   
42
43 INCLUDE(CPack)
44
45
46 # Aditional INSTALL for CPACK mecanism.
47
48 IF(WIN32)
49
50 OPTION(BBTK_STANDALONE_INSTALLER "Install and add to installer all dlls needed, including from external toolkits (wx,itk,vtk)?" OFF)
51
52 IF(BBTK_STANDALONE_INSTALLER)
53   STRING(REGEX REPLACE "\\\\" "/" WINDIR "$ENV{WINDIR}")
54   INSTALL(   FILES ${WINDIR}/system32/msvcp71d.dll                              DESTINATION bin/ )
55   INSTALL(   FILES ${WINDIR}/system32/msvcr71d.dll                              DESTINATION bin/ )
56
57   IF(USE_VTK)
58     SET(VTK_BIN_DIR ${VTK_DIR}/../../bin )
59
60     FILE(GLOB LST_FILE_VTKDLL "${VTK_BIN_DIR}/*.dll")
61     FOREACH( iLST  ${LST_FILE_VTKDLL} )
62        INSTALL( 
63          FILES ${iLST}
64          DESTINATION bin/
65        )
66     ENDFOREACH(iLST)
67   ENDIF(USE_VTK)
68     
69   IF(USE_ITK)
70     INSTALL(   FILES ${ITK_DIR}/../../bin/ITKCommon.dll         DESTINATION bin/ )
71   ENDIF(USE_ITK)
72
73   IF(USE_WXWIDGETS)
74     INSTALL(   FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxmsw28d_xrc_vc_custom.dll                        DESTINATION bin/ )
75     INSTALL(   FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxmsw28d_richtext_vc_custom.dll           DESTINATION bin/ )
76     INSTALL(   FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxmsw28d_qa_vc_custom.dll                         DESTINATION bin/ )
77     INSTALL(   FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxmsw28d_media_vc_custom.dll              DESTINATION bin/ )
78     INSTALL(   FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxmsw28d_html_vc_custom.dll               DESTINATION bin/ )
79     INSTALL(   FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxmsw28d_gl_vc_custom.dll                         DESTINATION bin/ )
80     INSTALL(   FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxmsw28d_core_vc_custom.dll               DESTINATION bin/ )
81     INSTALL(   FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxmsw28d_aui_vc_custom.dll                        DESTINATION bin/ )
82     INSTALL(   FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxmsw28d_adv_vc_custom.dll                        DESTINATION bin/ )
83     INSTALL(   FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxbase28d_xml_vc_custom.dll               DESTINATION bin/ )
84     INSTALL(   FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxbase28d_vc_custom.dll                           DESTINATION bin/ )
85     INSTALL(   FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxbase28d_odbc_vc_custom.dll              DESTINATION bin/ )
86     INSTALL(   FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxbase28d_net_vc_custom.dll                       DESTINATION bin/ )
87   ENDIF(USE_WXWIDGETS)
88 ENDIF(BBTK_STANDALONE_INSTALLER)
89
90 ENDIF(WIN32)