]> Creatis software - cpPlugins.git/blobdiff - lib/CMakeLists.txt
yet another refactoring
[cpPlugins.git] / lib / CMakeLists.txt
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
new file mode 100644 (file)
index 0000000..52132e6
--- /dev/null
@@ -0,0 +1,73 @@
+
+## ======================
+## == Helper libraries ==
+## ======================
+
+SET(
+  _cpExtensions_components
+  cpExtensions/Config.h.in
+  cpExtensions/DataStructures
+  cpExtensions/Algorithms
+  cpExtensions/Interaction
+  cpExtensions/Visualization
+  )
+
+IF(BUILD_QT4_COMPONENTS)
+  LIST(APPEND _cpExtensions_components "cpExtensions/QT")
+ENDIF(BUILD_QT4_COMPONENTS)
+cpPlugins_BuildLibrary(cpExtensions SHARED ${_cpExtensions_components})
+TARGET_LINK_LIBRARIES(
+  cpExtensions
+  ${QT_LIBRARIES} ${ITK_LIBRARIES} ${VTK_LIBRARIES}
+  )
+
+## ============================================
+## == Explicit instances from templated code ==
+## ============================================
+
+SUBDIRS(
+  cpInstances
+  )
+
+## ==================
+## == Base library ==
+## ==================
+
+SET(_real_config ${CMAKE_CURRENT_BINARY_DIR}/cpPlugins/RealConfig.h)
+ADD_CUSTOM_COMMAND(
+  OUTPUT ${_real_config}
+  COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/cpPlugins
+  COMMAND ${cpPlugins_bash_CreateRealConfig_APP} ${_real_config}
+  DEPENDS ${cpPlugins_bash_CreateRealConfig_APP}
+  )
+SET(
+  _cpPlugins_components
+  ${_real_config}
+  cpPlugins/Config.h.in
+  cpPlugins/tinyxml2
+  cpPlugins/OS
+  cpPlugins/Pipeline
+  cpPlugins/Interface
+  )
+IF(BUILD_QT4_COMPONENTS)
+  LIST(APPEND _cpPlugins_components "cpPlugins/QT")
+ENDIF(BUILD_QT4_COMPONENTS)
+cpPlugins_BuildLibrary(cpPlugins SHARED ${_cpPlugins_components})
+TARGET_LINK_LIBRARIES(cpPlugins ${ITK_LIBRARIES} ${VTK_LIBRARIES})
+IF(BUILD_QT4_COMPONENTS)
+  TARGET_LINK_LIBRARIES(cpPlugins ${QT_LIBRARIES})
+ENDIF(BUILD_QT4_COMPONENTS)
+
+## ===================================
+## == Base library for applications ==
+## ===================================
+
+IF(BUILD_QT4_COMPONENTS)
+  cpPlugins_BuildLibrary(cpBaseQtApplication SHARED cpBaseQtApplication)
+  TARGET_LINK_LIBRARIES(
+    cpBaseQtApplication
+    cpExtensions cpPlugins
+    )
+ENDIF(BUILD_QT4_COMPONENTS)
+
+## eof - $RCSfile$