]> Creatis software - cpPlugins.git/blob - lib/CMakeLists.txt
52132e64e75425ee5aacca6ab640eddddd9b864b
[cpPlugins.git] / lib / CMakeLists.txt
1
2 ## ======================
3 ## == Helper libraries ==
4 ## ======================
5
6 SET(
7   _cpExtensions_components
8   cpExtensions/Config.h.in
9   cpExtensions/DataStructures
10   cpExtensions/Algorithms
11   cpExtensions/Interaction
12   cpExtensions/Visualization
13   )
14
15 IF(BUILD_QT4_COMPONENTS)
16   LIST(APPEND _cpExtensions_components "cpExtensions/QT")
17 ENDIF(BUILD_QT4_COMPONENTS)
18 cpPlugins_BuildLibrary(cpExtensions SHARED ${_cpExtensions_components})
19 TARGET_LINK_LIBRARIES(
20   cpExtensions
21   ${QT_LIBRARIES} ${ITK_LIBRARIES} ${VTK_LIBRARIES}
22   )
23
24 ## ============================================
25 ## == Explicit instances from templated code ==
26 ## ============================================
27
28 SUBDIRS(
29   cpInstances
30   )
31
32 ## ==================
33 ## == Base library ==
34 ## ==================
35
36 SET(_real_config ${CMAKE_CURRENT_BINARY_DIR}/cpPlugins/RealConfig.h)
37 ADD_CUSTOM_COMMAND(
38   OUTPUT ${_real_config}
39   COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/cpPlugins
40   COMMAND ${cpPlugins_bash_CreateRealConfig_APP} ${_real_config}
41   DEPENDS ${cpPlugins_bash_CreateRealConfig_APP}
42   )
43 SET(
44   _cpPlugins_components
45   ${_real_config}
46   cpPlugins/Config.h.in
47   cpPlugins/tinyxml2
48   cpPlugins/OS
49   cpPlugins/Pipeline
50   cpPlugins/Interface
51   )
52 IF(BUILD_QT4_COMPONENTS)
53   LIST(APPEND _cpPlugins_components "cpPlugins/QT")
54 ENDIF(BUILD_QT4_COMPONENTS)
55 cpPlugins_BuildLibrary(cpPlugins SHARED ${_cpPlugins_components})
56 TARGET_LINK_LIBRARIES(cpPlugins ${ITK_LIBRARIES} ${VTK_LIBRARIES})
57 IF(BUILD_QT4_COMPONENTS)
58   TARGET_LINK_LIBRARIES(cpPlugins ${QT_LIBRARIES})
59 ENDIF(BUILD_QT4_COMPONENTS)
60
61 ## ===================================
62 ## == Base library for applications ==
63 ## ===================================
64
65 IF(BUILD_QT4_COMPONENTS)
66   cpPlugins_BuildLibrary(cpBaseQtApplication SHARED cpBaseQtApplication)
67   TARGET_LINK_LIBRARIES(
68     cpBaseQtApplication
69     cpExtensions cpPlugins
70     )
71 ENDIF(BUILD_QT4_COMPONENTS)
72
73 ## eof - $RCSfile$