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