X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=appli%2Fexamples%2Fplugins%2FCMakeLists.txt;h=90cd146323fbe64de7d12f006ae04bb905ce4288;hb=4e55e875e42fe56e3fb92a38015ffa035ac9d0bb;hp=0408f3c799222ff4752452bb79cdee70a74a87bd;hpb=e6bef8234ffd9030c68a6786466a08cf144b7871;p=cpPlugins.git diff --git a/appli/examples/plugins/CMakeLists.txt b/appli/examples/plugins/CMakeLists.txt index 0408f3c..90cd146 100644 --- a/appli/examples/plugins/CMakeLists.txt +++ b/appli/examples/plugins/CMakeLists.txt @@ -1,22 +1,25 @@ -SET( - examples_SOURCES - example_GuessPlugins - example_LoadPluginsFile - example_LoadPluginsDirectory - example_ReadWriteImage - example_ReadWriteImageWithWorkspace - example_ShowImage +## ============================ +## == Configure source files == +## ============================ + +SET(_pfx example_plugins) +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 cpPlugins) -ENDFOREACH(example) +## ========================== +## == Compile source files == +## ========================== -IF(USE_QT4) - SUBDIRS( - QT +FOREACH(_src ${all_SOURCE_CXX_FILES}) + GET_FILENAME_COMPONENT(_name ${_src} NAME_WE) + ADD_EXECUTABLE(${_pfx}_${_name} ${_src}) + TARGET_LINK_LIBRARIES( + ${_pfx}_${_name} + ${cpPlugins_LIB} ) -ENDIF(USE_QT4) +ENDFOREACH(_src) ## eof - $RCSfile$