1 #----------------------------------------------------------------------------
2 # SET THE NAME OF YOUR LIBRARY
5 SET ( LIBRARY_NAME creaMaracasVisu )
6 #----------------------------------------------------------------------------
8 #----------------------------------------------------------------------------
9 # CREATES A USER OPTION IN CMAKE
10 OPTION ( BUILD_${LIBRARY_NAME} "Build ${LIBRARY_NAME} library ?" ON)
12 OPTION ( EXPORTS_MaracasKernel "Build ${LIBRARY_NAME} library ?" ON)
13 IF (EXPORTS_MaracasKernel)
14 SET(MaracasKernel_EXPORTS)
15 ADD_DEFINITIONS (-DMaracasKernel_EXPORTS)
16 ENDIF(EXPORTS_MaracasKernel)
18 #----------------------------------------------------------------------------
19 IF ( BUILD_${LIBRARY_NAME} )
20 #----------------------------------------------------------------------------
22 #----------------------------------------------------------------------------
24 #----------------------------------------------------------------------------
25 #jhcl-Start===========================================================================
29 #${MARACAS_SOURCE_DIR}/src/axe3DVTK
30 # ${MARACAS_SOURCE_DIR}/src/interface
32 #${MARACAS_SOURCE_DIR}/src/SnakeIsoContour+Deriche
33 src/interface/wxWindows
34 src/interface/wxWindows/Contour
35 src/interface/wxWindows/widgets
36 src/interface/wxWindows/widgets/pPlotter
37 src/interface/wxWindows/widgets/manualContour
40 #message(jhcl\n\n ${crea_LIBRARIES})
41 #INCLUDE(include/Modules/MARACAS_Find_LIBIDO.cmake)
42 #SET(CREA_LIBRARIES C:/creaBin/Debug/crea.lib)
44 #jhcl-End===========================================================================
45 #----------------------------------------------------------------------------
46 # LIBRARY HEADERS (TO BE INSTALLED)
47 # EITHER LIST ALL .h IN CURRENT DIR USING NEXT LINE:
48 #FILE(GLOB ${LIBRARY_NAME}_HEADERS "*.h")
49 # OR MANUALLY LIST YOUR HEADERS WITH NEXT COMMAND
51 FILE(GLOB ${LIBRARY_NAME}_HEADERS_WXWIN "src/interface/wxWindows/*.h")
52 FILE(GLOB ${LIBRARY_NAME}_SOURCES_WXWIN src/interface/wxWindows/*.cxx src/interface/wxWindows/*.cpp src/interface/wxWindows/*.cc)
54 FILE(GLOB ${LIBRARY_NAME}_HEADERS_CONTOUR "src/interface/wxWindows/Contour/*.h")
55 FILE(GLOB ${LIBRARY_NAME}_SOURCES_CONTOUR src/interface/wxWindows/Contour/*.cxx src/interface/wxWindows/Contour/*.cpp src/interface/wxWindows/Contour/*.cc)
57 FILE(GLOB ${LIBRARY_NAME}_HEADERS_ThresholdImageView "src/interface/wxWindows/widgets/ThresholdImageView/*.h")
58 FILE(GLOB ${LIBRARY_NAME}_SOURCES_ThresholdImageView src/interface/wxWindows/widgets/ThresholdImageView/*.cxx src/interface/wxWindows/widgets/ThresholdImageView/*.cpp src/interface/wxWindows/widgets/ThresholdImageView/*.cc)
60 FILE(GLOB ${LIBRARY_NAME}_HEADERS_WIDGETS "src/interface/wxWindows/widgets/*.h")
61 FILE(GLOB ${LIBRARY_NAME}_SOURCES_WIDGETS src/interface/wxWindows/widgets/*.cxx src/interface/wxWindows/widgets/*.cpp src/interface/wxWindows/widgets/*.cc)
63 FILE(GLOB ${LIBRARY_NAME}_HEADERS_PPLOTTER "src/interface/wxWindows/widgets/pPlotter/*.h")
64 FILE(GLOB ${LIBRARY_NAME}_SOURCES_PPLOTTER src/interface/wxWindows/widgets/pPlotter/*.cxx src/interface/wxWindows/widgets/pPlotter/*.cpp src/interface/wxWindows/widgets/pPlotter/*.cc)
66 FILE(GLOB ${LIBRARY_NAME}_HEADERS_MANUAL_CONTOUR "src/interface/wxWindows/widgets/manualContour/*.h")
67 FILE(GLOB ${LIBRARY_NAME}_SOURCES_MANUAL_CONTOUR src/interface/wxWindows/widgets/manualContour/*.cpp )
69 FILE(GLOB ${LIBRARY_NAME}_HEADERS_KERNEL "src/kernel/*.h")
70 FILE(GLOB ${LIBRARY_NAME}_SOURCES_KERNEL src/kernel/*.cxx src/kernel/*.cpp src/kernel/*.cc)
73 SET ( ${LIBRARY_NAME}_HEADERS
74 ${${LIBRARY_NAME}_HEADERS_WXWIN}
75 ${${LIBRARY_NAME}_HEADERS_CONTOUR}
76 ${${LIBRARY_NAME}_HEADERS_ThresholdImageView}
77 ${${LIBRARY_NAME}_HEADERS_WIDGETS}
78 ${${LIBRARY_NAME}_HEADERS_PPLOTTER}
79 ${${LIBRARY_NAME}_HEADERS_MANUAL_CONTOUR}
81 ${${LIBRARY_NAME}_HEADERS_KERNEL}
83 #----------------------------------------------------------------------------
85 #----------------------------------------------------------------------------
86 # LIBRARY SOURCES (TO BE COMPILED)
87 # EITHER LIST ALL .cxx, *.cpp, *.cc IN CURRENT DIR USING NEXT LINE:
88 #FILE(GLOB ${LIBRARY_NAME}_SOURCES *.cxx *.cpp *.cc)
89 # OR MANUALLY LIST YOUR FILES WITH NEXT COMMAND (WITHOUT EXTENSION)
91 SET ( ${LIBRARY_NAME}_SOURCES
92 ${${LIBRARY_NAME}_SOURCES_WXWIN}
93 ${${LIBRARY_NAME}_SOURCES_CONTOUR}
94 ${${LIBRARY_NAME}_SOURCES_ThresholdImageView}
95 ${${LIBRARY_NAME}_SOURCES_WIDGETS}
96 ${${LIBRARY_NAME}_SOURCES_PPLOTTER}
97 ${${LIBRARY_NAME}_SOURCES_MANUAL_CONTOUR}
98 ${${LIBRARY_NAME}_SOURCES_KERNEL}
100 #----------------------------------------------------------------------------
101 #jhcl-Start===========================================================================
102 #message(jhcl4${LIBIDO_LIBRARIES})
103 #jhcl-End===========================================================================
105 #----------------------------------------------------------------------------
106 # LIBRARY DEPENDENCIES (LIBRARIES TO LINK WITH)
107 SET ( ${LIBRARY_NAME}_LINK_LIBRARIES
109 ${WXWIDGETS_LIBRARIES}
114 #jhcl-Start===========================================================================
119 #jhcl-End===========================================================================
121 #----------------------------------------------------------------------------
124 #----------------------------------------------------------------------------
125 # MACRO WHICH DOES ALL THE JOB : BUILD AND INSTALL
127 #CREA_ADD_LIBRARY( ${LIBRARY_NAME} )
130 # Ya esta hecho arriba
131 # SET(LIBRARY_NAME ******NOMBRE*******)
133 IF(CREA_VERBOSE_CMAKE)
134 MESSAGE(STATUS "** Creating library ${LIBRARY_NAME}")
135 MESSAGE(STATUS " Headers : ${${LIBRARY_NAME}_HEADERS}")
136 MESSAGE(STATUS " Sources : ${${LIBRARY_NAME}_SOURCES}")
137 MESSAGE(STATUS " Link libs: ${${LIBRARY_NAME}_LINK_LIBRARIES}")
138 ENDIF(CREA_VERBOSE_CMAKE)
143 ADD_LIBRARY (${LIBRARY_NAME} ${${LIBRARY_NAME}_SHARED} ${${LIBRARY_NAME}_SOURCES} ${${LIBRARY_NAME}_HEADERS})
146 TARGET_LINK_LIBRARIES(${LIBRARY_NAME} ${${LIBRARY_NAME}_LINK_LIBRARIES})
148 # Sets the settings for macro CREA_ADVANCED_INSTALL_LIBRARY_FOR_CMAKE
149 SET(${LIBRARY_NAME}_INSTALL_FOLDER ${LIBRARY_NAME})
150 SET(${LIBRARY_NAME}_LIBRARIES ${LIBRARY_NAME})
153 # ${LIBRARY_NAME}_BUILD_TREE_RELATIVE_INCLUDE_PATHS
154 # ${PROJECT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}
157 SET(${LIBRARY_NAME}_BUILD_TREE_RELATIVE_INCLUDE_PATHS
159 #lib/THIS_DIR/other_headers
160 lib/maracasVisuLib/src
161 #${MARACAS_SOURCE_DIR}/src/axe3DVTK
162 # ${MARACAS_SOURCE_DIR}/src/interface
163 lib/maracasVisuLib/src/kernel
164 #${MARACAS_SOURCE_DIR}/src/SnakeIsoContour+Deriche
165 lib/maracasVisuLib/src/interface/wxWindows
166 lib/maracasVisuLib/src/interface/wxWindows/Contour
167 lib/maracasVisuLib/src/interface/wxWindows/widgets
168 lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter
169 lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour
170 lib/maracasVisuLib/../../../
172 IF ( ${PROJECT_BINARY_DIR} STREQUAL ${EXECUTABLE_OUTPUT_PATH} )
173 SET(CILFC_EXECUTABLE_OUTPUT_REL_PATH ".")
174 ELSE ( ${PROJECT_BINARY_DIR} STREQUAL ${EXECUTABLE_OUTPUT_PATH} )
176 CILFC_EXECUTABLE_OUTPUT_REL_PATH
177 ${PROJECT_BINARY_DIR} ${EXECUTABLE_OUTPUT_PATH})
178 ENDIF ( ${PROJECT_BINARY_DIR} STREQUAL ${EXECUTABLE_OUTPUT_PATH} )
181 SET(${LIBRARY_NAME}_BUILD_TREE_RELATIVE_LIBRARY_PATHS
182 ${CILFC_EXECUTABLE_OUTPUT_REL_PATH})
183 SET(${LIBRARY_NAME}_INSTALL_TREE_RELATIVE_LIBRARY_PATHS lib)
185 SET(${LIBRARY_NAME}_BUILD_TREE_RELATIVE_LIBRARY_PATHS
186 ${CILFC_EXECUTABLE_OUTPUT_REL_PATH})
187 SET(${LIBRARY_NAME}_INSTALL_TREE_RELATIVE_LIBRARY_PATHS bin)
189 SET(${LIBRARY_NAME}_INSTALL_TREE_RELATIVE_INCLUDE_PATHS include/${LIBRARY_NAME})
190 SET(${LIBRARY_NAME}_HAS_ADDITIONAL_CONFIG_FILE FALSE)
191 # SET(${LIBRARY_NAME}_ADDITIONAL_CONFIG_FILE
192 # ${PROJECT_SOURCE_DIR}/src/AdditionalcreaImageIOConfig.cmake.in)
193 # SET(${LIBRARY_NAME}_ADDITIONAL_USE_FILE
194 # ${PROJECT_SOURCE_DIR}/src/AdditionalUsecreaImageIO.cmake.in)
196 # Invoke the advanced macro
197 CREA_ADVANCED_INSTALL_LIBRARY_FOR_CMAKE(${LIBRARY_NAME})
201 FILES ${${LIBRARY_NAME}_HEADERS}
202 DESTINATION ${${LIBRARY_NAME}_INSTALL_TREE_RELATIVE_INCLUDE_PATHS}
206 TARGETS ${LIBRARY_NAME}
210 TARGETS ${LIBRARY_NAME}
218 #----------------------------------------------------------------------------
221 #---------------------------------------------------------------------------
222 ENDIF ( BUILD_${LIBRARY_NAME} )