Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
further cleanups of the DLL usage madness
[simgrid.git] / tools / cmake / MakeLibWin.cmake
1 ### Make Libs
2
3 add_library(simgrid SHARED ${simgrid_sources})
4
5 if(MSVC)
6   set_target_properties(simgrid  PROPERTIES 
7        COMPILE_FLAGS "/DDLL_EXPORT" 
8        VERSION ${libsimgrid_version} )
9 else()
10   set_target_properties(simgrid  PROPERTIES 
11        COMPILE_FLAGS "-DDLL_EXPORT" 
12        LINK_FLAGS "-shared" 
13        VERSION ${libsimgrid_version} 
14        PREFIX "lib" SUFFIX ".dll" 
15        IMPORT_PREFIX "lib" IMPORT_SUFFIX ".dll")
16
17   set(SIMGRID_DEP "-lm")
18
19   if (HAVE_PTHREAD)
20     set(SIMGRID_DEP "${SIMGRID_DEP} -lpthread")
21   endif()
22 endif()
23
24 target_link_libraries(simgrid   ${SIMGRID_DEP})
25