X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/82bfb9e0085b4252a56331671c585f4c744d7de4..3a42d7a9a23f7eeeb8448083ccd8d3da9a69197c:/buildtools/Cmake/MakeExeLib.cmake diff --git a/buildtools/Cmake/MakeExeLib.cmake b/buildtools/Cmake/MakeExeLib.cmake index 34890fba9f..10c9e318ce 100644 --- a/buildtools/Cmake/MakeExeLib.cmake +++ b/buildtools/Cmake/MakeExeLib.cmake @@ -4,17 +4,20 @@ if(enable_supernovae) include(${PROJECT_DIRECTORY}/buildtools/Cmake/Supernovae.cmake) else(enable_supernovae) add_library(simgrid SHARED ${simgrid_sources}) - add_library(simgrid_static STATIC ${simgrid_sources}) add_library(gras SHARED ${gras_sources}) + if(enable_lib_static) + add_library(simgrid_static STATIC ${simgrid_sources}) + endif(enable_lib_static) if(enable_smpi) add_library(smpi SHARED ${SMPI_SRC}) - add_library(smpi_static STATIC ${SMPI_SRC}) + if(enable_lib_static) + add_library(smpi_static STATIC ${SMPI_SRC}) + endif(enable_lib_static) endif(enable_smpi) endif(enable_supernovae) set_target_properties(simgrid PROPERTIES VERSION ${libsimgrid_version}) set_target_properties(gras PROPERTIES VERSION ${libgras_version}) - if(enable_smpi) set_target_properties(smpi PROPERTIES VERSION ${libsmpi_version}) endif(enable_smpi) @@ -91,18 +94,23 @@ if(HAVE_POSIX_GETTIME) endif(HAVE_POSIX_GETTIME) target_link_libraries(simgrid ${SIMGRID_DEP}) -target_link_libraries(simgrid_static ${SIMGRID_DEP}) target_link_libraries(gras ${GRAS_DEP}) - add_dependencies(gras maintainer_files) -add_dependencies(simgrid maintainer_files) -add_dependencies(simgrid_static maintainer_files) - +add_dependencies(simgrid maintainer_files) if(enable_smpi) target_link_libraries(smpi simgrid ${SMPI_DEP}) - target_link_libraries(smpi_static simgrid ${SMPI_DEP}) endif(enable_smpi) +if(enable_lib_static) + target_link_libraries(simgrid_static ${SIMGRID_DEP}) + add_dependencies(simgrid_static maintainer_files) + set_target_properties(simgrid_static PROPERTIES OUTPUT_NAME simgrid) + if(enable_smpi) + target_link_libraries(smpi_static simgrid ${SMPI_DEP}) + set_target_properties(smpi_static PROPERTIES OUTPUT_NAME smpi) + endif(enable_smpi) +endif(enable_lib_static) + ### Make EXEs #src/testall