]> Creatis software - creaImageIO.git/blob - install/CMakeLists.txt
New folder structure to comply with Linux and Mac OS standards and documentation...
[creaImageIO.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 INCLUDE(InstallRequiredSystemLibraries)
16
17 SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "creaImageIO - 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 ${PROJECT_MAJOR_VERSION})
22 SET(CPACK_PACKAGE_VERSION_MINOR ${PROJECT_MINOR_VERSION})
23 SET(CPACK_PACKAGE_VERSION_PATCH ${PROJECT_BUILD_VERSION})
24
25
26   SET(CPACK_PACKAGE_INSTALL_DIRECTORY "CreaTools\\\\creaImageIO-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
27   IF(WIN32)
28     SET(CMAKE_INSTALL_PREFIX ${CPACK_PACKAGE_INSTALL_DIRECTORY})
29   ENDIF(WIN32)
30
31
32
33
34
35 IF(WIN32 AND NOT UNIX)
36   # There is a bug in NSI that does not handle full unix paths properly. Make
37   # sure there is at least one set of four (4) backlasshes.
38 #EED  SET(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/kernel/install/gnome/bbi-icon2.bmp")
39 #  SET(CPACK_NSIS_INSTALLED_ICON_NAME "bin/BBI_EXE.exe")
40   SET(CPACK_NSIS_DISPLAY_NAME "creaImageIO")
41   SET(CPACK_NSIS_HELP_LINK "http://www.creatis.insa-lyon.fr/creatools/creaImageIO")
42   SET(CPACK_NSIS_URL_INFO_ABOUT "http://www.creatis.insa-lyon.fr/creatools/creaImageIO")
43   SET(CPACK_NSIS_CONTACT "info-dev@creatis.insa-lyon.fr")
44   SET(CPACK_NSIS_MODIFY_PATH ON)
45 ELSE(WIN32 AND NOT UNIX)
46 #  SET(CPACK_STRIP_FILES "bin/bbi")
47   SET(CPACK_SOURCE_STRIP_FILES "")
48 ENDIF(WIN32 AND NOT UNIX)
49 SET(CPACK_PACKAGE_EXECUTABLES "TestWxGimmickReaderDialog" "TestWxGimmickReaderDialog")
50   
51
52 INCLUDE(CPack)
53
54 OPTION(BUILD_STANDALONE_INSTALLER "Build installer which installs all the third-party dynamic libraries needed ?" OFF) 
55 IF(BUILD_STANDALONE_INSTALLER) 
56   SET (ADDITIONAL_DLL_PATH "C:/Program Files/CreaTools/crea_ThirdParty_dlls-0.2.0/bin" CACHE PATH "Additional paths in which to look for dlls")
57 ENDIF(BUILD_STANDALONE_INSTALLER)
58
59
60 # Aditional INSTALL for CPACK mecanism.
61 IF (WIN32)
62
63   INSTALL( FILES ${PROJECT_SOURCE_DIR}/win32/sqlite3.dll DESTINATION bin ) 
64
65      
66
67 ENDIF (WIN32)
68
69  INSTALL( FILES ${PROJECT_SOURCE_DIR}/src2/data/localdatabase_Descriptor.txt DESTINATION bin/Shared/gimmick )
70  
71 IF (BUILD_STANDALONE_INSTALLER)
72
73   IF(WIN32)
74    INSTALL(   FILES ${SYSTEMROOT}/system32/msvcp71d.dll                                 DESTINATION bin/ )
75    INSTALL(   FILES ${SYSTEMROOT}/system32/msvcr71d.dll                                 DESTINATION bin/ )
76   INSTALL(   FILES ${PROJECT_BINARY_DIR}/relwithdebinfo//crea.dll                               DESTINATION bin/ )
77   INSTALL(   FILES ${PROJECT_BINARY_DIR}/relwithdebinfo//sqlite3.dll                            DESTINATION bin/ )
78
79   #VTK dlls
80   #GDCM dlls
81   #WXWIDGETS dlls
82   IF(USE_VTK)
83     FILE(GLOB LST_FILE_VTKDLL "${ADDITIONAL_DLL_PATH}/*.dll")
84     FOREACH( iLST  ${LST_FILE_VTKDLL} )
85        INSTALL( 
86          FILES ${iLST}
87          DESTINATION bin/
88       )
89     ENDFOREACH(iLST)
90   ENDIF(USE_VTK)
91     
92  IF(USE_BOOST)
93          INSTALL(   FILES   ${Boost_INCLUDE_DIR}/lib/boost_date_time-vc71-mt-1_38.dll                   DESTINATION bin/ )
94          INSTALL(   FILES   ${Boost_INCLUDE_DIR}/lib/boost_filesystem-vc71-mt-1_38.dll                          DESTINATION bin/ )
95          INSTALL(   FILES   ${Boost_INCLUDE_DIR}/lib/boost_iostreams-vc71-mt-1_38.dll                   DESTINATION bin/ )
96          INSTALL(   FILES   ${Boost_INCLUDE_DIR}/lib/boost_signals-vc71-mt-1_38.dll                     DESTINATION bin/ )
97          INSTALL(   FILES   ${Boost_INCLUDE_DIR}/lib/boost_thread-vc71-mt-1_38.dll                              DESTINATION bin/ )
98  ENDIF(USE_BOOST)
99         
100   
101 ENDIF(WIN32)
102
103 ENDIF (BUILD_STANDALONE_INSTALLER)
104
105
106