1 # ---------------------------------------------------------------------
3 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
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
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.
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
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 # ------------------------------------------------------------------------
26 #----------------------------------------------------------------------------
27 # SET THE NAME OF YOUR LIBRARY
28 SET ( LIBRARY_NAME creaBruker )
29 #----------------------------------------------------------------------------
31 #----------------------------------------------------------------------------
32 # CREATES A USER OPTION IN CMAKE
33 OPTION ( BUILD_${LIBRARY_NAME} "Build ${LIBRARY_NAME} library ?" ON)
34 #----------------------------------------------------------------------------
36 #----------------------------------------------------------------------------
37 IF ( BUILD_${LIBRARY_NAME} )
38 #----------------------------------------------------------------------------
40 #----------------------------------------------------------------------------
42 #----------------------------------------------------------------------------
48 #----------------------------------------------------------------------------
49 # LIBRARY HEADERS (TO BE INSTALLED)
50 # EITHER LIST ALL .h IN CURRENT DIR USING NEXT LINE:
51 FILE(GLOB ${LIBRARY_NAME}_HEADERS "*.h")
52 # OR MANUALLY LIST YOUR HEADERS WITH NEXT COMMAND
53 # SET ( ${LIBRARY_NAME}_HEADERS
56 #----------------------------------------------------------------------------
58 #----------------------------------------------------------------------------
59 # LIBRARY SOURCES (TO BE COMPILED)
60 # EITHER LIST ALL .cxx, *.cpp, *.cc IN CURRENT DIR USING NEXT LINE:
61 FILE(GLOB ${LIBRARY_NAME}_SOURCES *.cxx *.cpp *.cc)
62 # OR MANUALLY LIST YOUR FILES WITH NEXT COMMAND (WITHOUT EXTENSION)
63 # SET ( ${LIBRARY_NAME}_SOURCES
66 #----------------------------------------------------------------------------
67 #TO SWITCH BETWEEN GDCM AND GDCM2
68 message ("avant... ${creaBruker_SOURCES}")
70 LIST(REMOVE_ITEM ${LIBRARY_NAME}_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/bruker2dicom.cxx")
71 LIST(REMOVE_ITEM ${LIBRARY_NAME}_HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/ bruker2dicom.h")
74 LIST(REMOVE_ITEM ${LIBRARY_NAME}_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/bruker2dicom2.cxx")
75 LIST(REMOVE_ITEM ${LIBRARY_NAME}_HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/ bruker2dicom2.h")
77 message ("apres... ${creaBruker_SOURCES}")
78 #----------------------------------------------------------------------------
79 # LIBRARY DEPENDENCIES (LIBRARIES TO LINK WITH)
80 SET ( ${LIBRARY_NAME}_LINK_LIBRARIES
82 # ${WXWIDGETS_LIBRARIES}
86 #EED31jan2013 ${BOOST_LIBRARIES}
88 #----------------------------------------------------------------------------
90 IF(CREA_VERBOSE_CMAKE)
91 MESSAGE(STATUS "** Creating library ${LIBRARY_NAME}")
92 MESSAGE(STATUS " Headers : ${${LIBRARY_NAME}_HEADERS}")
93 MESSAGE(STATUS " Sources : ${${LIBRARY_NAME}_SOURCES}")
94 MESSAGE(STATUS " Link libs: ${${LIBRARY_NAME}_LINK_LIBRARIES}")
95 ENDIF(CREA_VERBOSE_CMAKE)
98 #----------------------------------------------------------------------------
100 SET(${LIBRARY_NAME}_BUILD_TREE_RELATIVE_INCLUDE_PATHS
104 OPTION( BUILD_DOXYGEN_DOC "Build doxygen doc ?" OFF)
105 IF(BUILD_DOXYGEN_DOC)
106 ADD_SUBDIRECTORY(doxygen)
107 ENDIF(BUILD_DOXYGEN_DOC)
114 ## IF ( ${PROJECT_BINARY_DIR} STREQUAL ${EXECUTABLE_OUTPUT_PATH} )
115 ## SET(CILFC_EXECUTABLE_OUTPUT_REL_PATH ".")
116 ## ELSE ( ${PROJECT_BINARY_DIR} STREQUAL ${EXECUTABLE_OUTPUT_PATH} )
117 ## FILE(RELATIVE_PATH
118 ## CILFC_EXECUTABLE_OUTPUT_REL_PATH
119 ## ${PROJECT_BINARY_DIR} ${EXECUTABLE_OUTPUT_PATH})
120 ## ENDIF ( ${PROJECT_BINARY_DIR} STREQUAL ${EXECUTABLE_OUTPUT_PATH} )
123 ## SET(${LIBRARY_NAME}_BUILD_TREE_RELATIVE_LIBRARY_PATHS
124 ## ${CILFC_EXECUTABLE_OUTPUT_REL_PATH})
125 ## SET(${LIBRARY_NAME}_INSTALL_TREE_RELATIVE_LIBRARY_PATHS lib)
127 ## SET(${LIBRARY_NAME}_BUILD_TREE_RELATIVE_LIBRARY_PATHS
128 ## ${CILFC_EXECUTABLE_OUTPUT_REL_PATH})
129 ## SET(${LIBRARY_NAME}_INSTALL_TREE_RELATIVE_LIBRARY_PATHS bin)
131 ## SET(${LIBRARY_NAME}_INSTALL_TREE_RELATIVE_INCLUDE_PATHS include/${LIBRARY_NAME})
133 ## #EED ???? set(CILFC_EXECUTABLE_OUTPUT_REL_PATH ".")
135 #----------------------------------------------------------------------------
136 # MACRO WHICH DOES ALL THE JOB : BUILD AND INSTALL
137 CREA_ADD_LIBRARY( ${LIBRARY_NAME} )
138 # Invoke the advanced macro
139 ##EED CREA_ADVANCED_INSTALL_LIBRARY_FOR_CMAKE(${LIBRARY_NAME})
140 #----------------------------------------------------------------------------
147 #---------------------------------------------------------------------------
148 ENDIF ( BUILD_${LIBRARY_NAME} )