]> Creatis software - crea.git/blob - install/CMakeLists.txt
Fixes:
[crea.git] / install / CMakeLists.txt
1 # ---------------------------------------------------------------------
2 #
3 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image 
4 #                        pour la Sant�)
5 # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
6 # Previous Authors : Laurent Guigues, Jean-Pierre Roux
7 # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
8 #
9 #  This software is governed by the CeCILL-B license under French law and 
10 #  abiding by the rules of distribution of free software. You can  use, 
11 #  modify and/ or redistribute the software under the terms of the CeCILL-B 
12 #  license as circulated by CEA, CNRS and INRIA at the following URL 
13 #  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html 
14 #  or in the file LICENSE.txt.
15 #
16 #  As a counterpart to the access to the source code and  rights to copy,
17 #  modify and redistribute granted by the license, users are provided only
18 #  with a limited warranty  and the software's author,  the holder of the
19 #  economic rights,  and the successive licensors  have only  limited
20 #  liability. 
21 #
22 #  The fact that you are presently reading this means that you have had
23 #  knowledge of the CeCILL-B license and that you accept its terms.
24 # ------------------------------------------------------------------------ */ 
25
26
27 #-----------------------------------------------------------------------------
28 # Code installing the files needed to find the library
29 # with the cmake command FIND_PACKAGE
30 # Uses CREA_ADVANCED_INSTALL_LIBRARY_FOR_CMAKE macro
31 #-----------------------------------------------------------------------------
32
33 #-----------------------------------------------------------------------------
34 # - Set the variable LIBRARY_NAME to the name of your library
35 SET(LIBRARY_NAME crea)
36
37 SET(${LIBRARY_NAME}_INSTALL_FOLDER crea)
38 SET(${LIBRARY_NAME}_LIBRARIES crea)
39
40 SET(${LIBRARY_NAME}_BUILD_TREE_RELATIVE_INCLUDE_PATHS src)
41
42 IF(UNIX)
43   SET(${LIBRARY_NAME}_BUILD_TREE_RELATIVE_LIBRARY_PATHS 
44     .) # ${EXECUTABLE_OUTPUT_REL_PATH})
45 ELSE(UNIX)
46   SET(${LIBRARY_NAME}_BUILD_TREE_RELATIVE_LIBRARY_PATHS
47      .    )
48 #    Debug
49 #    Release)
50 ENDIF(UNIX)
51
52 SET(${LIBRARY_NAME}_INSTALL_TREE_RELATIVE_INCLUDE_PATHS include/crea)
53 SET(${LIBRARY_NAME}_INSTALL_TREE_RELATIVE_LIBRARY_PATHS ${CREA_LIB_PATH})
54
55 # OPTIONAL 
56 # - Set the version of your library
57 # SET YOUR LIB VERSION
58 #SET(${LIBRARY_NAME}_MAJOR_VERSION 1)
59 #SET(${LIBRARY_NAME}_MINOR_VERSION 0)
60 #SET(${LIBRARY_NAME}_BUILD_VERSION 0)
61 # REQUIRED BUILD FLAGS
62 #SET(${LIBRARY_NAME}_REQUIRED_C_FLAGS "")
63 #SET(${LIBRARY_NAME}_REQUIRED_CXX_FLAGS "")
64 #SET(${LIBRARY_NAME}_REQUIRED_LINK_FLAGS "")
65 # ADDITIONAL CONFIG FILE
66 SET(${LIBRARY_NAME}_HAS_ADDITIONAL_CONFIG_FILE TRUE)
67 SET(${LIBRARY_NAME}_ADDITIONAL_CONFIG_FILE 
68   ${PROJECT_SOURCE_DIR}/AdditionalcreaConfig.cmake.in)
69 SET(${LIBRARY_NAME}_ADDITIONAL_USE_FILE 
70   ${PROJECT_SOURCE_DIR}/AdditionalUsecrea.cmake.in)
71
72 # Invoke the macro
73 CREA_ADVANCED_INSTALL_LIBRARY_FOR_CMAKE(${LIBRARY_NAME})
74 #-----------------------------------------------------------------------------
75
76 #-----------------------------------------------------------------------------
77 # CPACK+NSIS PACKAGING
78 #-----------------------------------------------------------------------------
79
80 #---Documentation-------------
81 #http://www.cmake.org/Wiki/CMake:Packaging_With_CPack
82 #http://www.cmake.org/Wiki/CMake:CPackConfiguration
83 #http://www.cmake.org/Wiki/CMake:Install_Commands
84
85
86 INCLUDE(InstallRequiredSystemLibraries)
87
88 SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "crea - CREATIS")
89 SET(CPACK_PACKAGE_VENDOR "CREATIS")
90 SET(CPACK_PACKAGE_DESCRIPTION_FILE "${PROJECT_SOURCE_DIR}/README.txt")
91 SET(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE.txt")
92 SET(CPACK_PACKAGE_VERSION_MAJOR ${crea_MAJOR_VERSION})
93 SET(CPACK_PACKAGE_VERSION_MINOR ${crea_MINOR_VERSION})
94 SET(CPACK_PACKAGE_VERSION_PATCH ${crea_BUILD_VERSION})
95
96 IF(WIN32)
97         SET(CPACK_PACKAGE_INSTALL_DIRECTORY "CreaTools\\\\crea-${crea_MAJOR_VERSION}.${crea_MINOR_VERSION}.${crea_BUILD_VERSION}")
98 ELSE(WIN32)
99         SET(CPACK_PACKAGE_INSTALL_DIRECTORY "CreaTools/crea-${crea_MAJOR_VERSION}.${crea_MINOR_VERSION}.${crea_BUILD_VERSION}")
100 ENDIF(WIN32)
101
102 IF(WIN32 AND NOT UNIX)
103   # There is a bug in NSI that does not handle full unix paths properly. Make
104   # sure there is at least one set of four (4) backlasshes.
105 #EED  SET(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/kernel/install/gnome/bbi-icon2.bmp")
106 #  SET(CPACK_NSIS_INSTALLED_ICON_NAME "bin/BBI_EXE.exe")
107   SET(CPACK_NSIS_DISPLAY_NAME "crea")
108   SET(CPACK_NSIS_HELP_LINK "http://www.creatis.insa-lyon.fr/site/en/CreatoolsCrea")
109   SET(CPACK_NSIS_URL_INFO_ABOUT "http://www.creatis.insa-lyon.fr/site/en/CreatoolsCrea")
110   SET(CPACK_NSIS_CONTACT "info-dev@creatis.insa-lyon.fr")
111   SET(CPACK_NSIS_MODIFY_PATH ON)
112 ELSE(WIN32 AND NOT UNIX)
113 #  SET(CPACK_STRIP_FILES "bin/bbi")
114   SET(CPACK_SOURCE_STRIP_FILES "")
115 ENDIF(WIN32 AND NOT UNIX)
116 SET(CPACK_PACKAGE_EXECUTABLES "creaNewProject" "New project")
117
118   
119
120 INCLUDE(CPack)
121