]> Creatis software - cpPlugins.git/blobdiff - appli/examples/extensions/CMakeLists.txt
Code cleaning
[cpPlugins.git] / appli / examples / extensions / CMakeLists.txt
index 281512080cbea92050f11528663356f858b9f1b5..0edb01240895e0c1f3e18f9468399f96e903cd5b 100644 (file)
@@ -1,11 +1,21 @@
-SET(
-  examples_SOURCES
-  example_KalmanVelocity
+## ============================
+## == Configure source files ==
+## ============================
+
+FILE(
+  GLOB all_SOURCE_CXX_FILES RELATIVE
+  "${CMAKE_CURRENT_SOURCE_DIR}"
+  "${CMAKE_CURRENT_SOURCE_DIR}/*.cxx"
   )
 
-FOREACH(example ${examples_SOURCES})
-  ADD_EXECUTABLE(${example} ${example}.cxx)
-  TARGET_LINK_LIBRARIES(${example} cpExtensions)
-ENDFOREACH(example)
+## ==========================
+## == Compile source files ==
+## ==========================
+
+FOREACH(source ${all_SOURCE_CXX_FILES})
+  GET_FILENAME_COMPONENT(name ${source} NAME_WE)
+  ADD_EXECUTABLE(${name} ${source})
+  TARGET_LINK_LIBRARIES(${name} ${cpExtensions_LIB})
+ENDFOREACH(source)
 
 ## eof - $RCSfile$