X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=appli%2Fbash%2FCMakeLists.txt;h=6d2c288096c6769c91ed663ab8ec854560992ba5;hb=b18ec38ef9775f0627085119f593ba1c37088478;hp=2eac91c619a234c6b0ef930a7fa68414961f3be1;hpb=1b0022070ff3b5f80f6f8c8b87f73032f5685eaf;p=cpPlugins.git diff --git a/appli/bash/CMakeLists.txt b/appli/bash/CMakeLists.txt index 2eac91c..6d2c288 100644 --- a/appli/bash/CMakeLists.txt +++ b/appli/bash/CMakeLists.txt @@ -1,16 +1,27 @@ -SET( - bash_SOURCES - cpPlugins_HostCreator +## ============================ +## == Configure source files == +## ============================ + +FILE( + GLOB all_SOURCE_CXX_FILES RELATIVE + "${CMAKE_CURRENT_SOURCE_DIR}" + "${CMAKE_CURRENT_SOURCE_DIR}/*.cxx" ) -FOREACH(program ${bash_SOURCES}) - ADD_EXECUTABLE(${program} ${program}.cxx) +## ========================== +## == Compile source files == +## ========================== + +FOREACH(source ${all_SOURCE_CXX_FILES}) + GET_FILENAME_COMPONENT(name ${source} NAME_WE) + ADD_EXECUTABLE(${name} ${source}) INSTALL( - TARGETS ${program} + TARGETS ${name} RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib/static ) -ENDFOREACH(program) + SET(${name}_APP ${name} CACHE INTERNAL "bash program ${name}") +ENDFOREACH(source) ## eof - $RCSfile$