Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
This is better for regex ... sorry
[simgrid.git] / buildtools / Cmake / MakeLibWin.cmake
index cd3e5da..19fb446 100644 (file)
@@ -6,6 +6,11 @@ add_library(gras SHARED ${gras_sources})
 set_target_properties(gras     PROPERTIES COMPILE_FLAGS "-D_XBT_DLL_EXPORT -DDLL_EXPORT" VERSION ${libgras_version}    OUTPUT_NAME "gras")
 set_target_properties(simgrid  PROPERTIES COMPILE_FLAGS "-D_XBT_DLL_EXPORT -DDLL_EXPORT" VERSION ${libsimgrid_version} OUTPUT_NAME "simgrid")
 
+if(enable_smpi)
+  add_library(smpi SHARED ${SMPI_SRC})
+  set_target_properties(smpi PROPERTIES COMPILE_FLAGS "-D_XBT_DLL_EXPORT -DDLL_EXPORT" VERSION ${libsmpi_version} OUTPUT_NAME "smpi")
+endif(enable_smpi)
+
 # libpthreadGC2.dll
 if(ARCH_32_BITS)
   find_library(PATH_PTHREAD_LIB
@@ -25,6 +30,7 @@ endif()
 
 set(GRAS_DEP "ws2_32 ${PATH_PTHREAD_LIB}")
 set(SIMGRID_DEP "ws2_32 ${PATH_PCRE_LIB} ${PATH_PTHREAD_LIB}")
+set(SMPI_DEP "${LIBRARY_OUTPUT_PATH}/libsimgrid.dll")
 
 if(ARCH_32_BITS)
   set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32 -march=i486")
@@ -35,6 +41,10 @@ endif()
 
 target_link_libraries(gras     ${GRAS_DEP})
 target_link_libraries(simgrid  ${SIMGRID_DEP})
+if(enable_smpi)
+add_dependencies(smpi simgrid)
+target_link_libraries(smpi     ${SMPI_DEP})
+endif(enable_smpi)
 
 find_path(PEXPORTS_PATH NAMES pexports.exe PATHS NO_DEFAULT_PATHS)
 message(STATUS "pexports: ${PEXPORTS_PATH}")
@@ -49,4 +59,4 @@ if(enable_smpi)
 
   set(SMPI_LDEP "")
   target_link_libraries(smpi   simgrid ${SMPI_LDEP})
-endif()
\ No newline at end of file
+endif()