X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/e6116c4e424051df387c1650935fa658de5f500f..ed4446ce27bd7391527c0368a0ebd3f91db159b1:/buildtools/Cmake/MakeExeLib.cmake diff --git a/buildtools/Cmake/MakeExeLib.cmake b/buildtools/Cmake/MakeExeLib.cmake index 2c6745b3d4..eb95771a55 100644 --- a/buildtools/Cmake/MakeExeLib.cmake +++ b/buildtools/Cmake/MakeExeLib.cmake @@ -1,4 +1,12 @@ ### Make Libs +if(WIN32) + foreach(file ${simgrid_sources}) + set_source_files_properties(${file} PROPERTIES COMPILE_FLAGS "/D DLL_EXPORT") + endforeach(file ${simgrid_sources}) + foreach(file ${gras_sources}) + set_source_files_properties(${file} PROPERTIES COMPILE_FLAGS "/D DLL_EXPORT") + endforeach(file ${gras_sources}) +endif(WIN32) if(enable_supernovae AND NOT WIN32) include(${PROJECT_DIRECTORY}/buildtools/Cmake/Supernovae.cmake) @@ -17,19 +25,26 @@ if(enable_smpi) set_target_properties(smpi PROPERTIES VERSION ${libsmpi_version}) endif(enable_smpi) - -set(GRAS_DEP "-lm -lpthread") -set(SIMGRID_DEP "-lm") -set(SMPI_DEP "") - if(WIN32) set(GRAS_DEP "wsock32") set(SIMGRID_DEP "wsock32") +else(WIN32) + set(GRAS_DEP "-lm -lpthread") + set(SIMGRID_DEP "-lm") + set(SMPI_DEP "") endif(WIN32) if(HAVE_RUBY) set(SIMGRID_DEP "${SIMGRID_DEP} -l${RUBY_LIBRARY_NAME} -module") - exec_program("${CMAKE_COMMAND} -E create_symlink ${CMAKE_BINARY_DIR}/lib/libsimgrid.so ${PROJECT_DIRECTORY}/src/bindings/ruby/libsimgrid.so" "${PROJECT_DIRECTORY}" OUTPUT_VARIABLE LIEN_OK) + exec_program("${CMAKE_COMMAND} -E create_symlink ${CMAKE_BINARY_DIR}/lib/libsimgrid.so ${PROJECT_DIRECTORY}/src/bindings/ruby/libsimgrid.so" + "${PROJECT_DIRECTORY}" + OUTPUT_VARIABLE IGNORED) + + # Make sure this extra link will get cleaned + get_directory_property(extra_clean_files ADDITIONAL_MAKE_CLEAN_FILES) + set_directory_properties( + PROPERTIES + ADDITIONAL_MAKE_CLEAN_FILES "${extra_clean_files};${PROJECT_DIRECTORY}/src/bindings/ruby/libsimgrid.so") endif(HAVE_RUBY) if(CMAKE_SYSTEM_NAME MATCHES "Darwin") @@ -49,7 +64,15 @@ endif(pthread) if(HAVE_LUA) SET(SIMGRID_DEP "${SIMGRID_DEP} -ldl -l${liblua}") - exec_program("${CMAKE_COMMAND} -E create_symlink ${CMAKE_BINARY_DIR}/lib/libsimgrid.so ${PROJECT_DIRECTORY}/examples/lua/simgrid.so" "${PROJECT_DIRECTORY}" OUTPUT_VARIABLE LIEN_OK) + exec_program("${CMAKE_COMMAND} -E create_symlink ${CMAKE_BINARY_DIR}/lib/libsimgrid.so ${PROJECT_DIRECTORY}/examples/lua/simgrid.so" + "${PROJECT_DIRECTORY}" + OUTPUT_VARIABLE IGNORED) + + # Make sure this extra link will get cleaned + get_directory_property(extra_clean_files ADDITIONAL_MAKE_CLEAN_FILES) + set_directory_properties( + PROPERTIES + ADDITIONAL_MAKE_CLEAN_FILES "${extra_clean_files};${PROJECT_DIRECTORY}/examples/lua/simgrid.so") endif(HAVE_LUA) if(HAVE_GTNETS)