Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
kill ALL trailing whitespace (and deprecate a function in Link)
[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   if (HAVE_BOOST_CONTEXTS)
23     set(SIMGRID_DEP "${SIMGRID_DEP} ${Boost_CONTEXT_LIBRARY}")
24   endif()
25 endif()
26
27 target_link_libraries(simgrid   ${SIMGRID_DEP})
28
29 # The library can obviously use the internal headers
30 set_property(TARGET simgrid
31              APPEND PROPERTY INCLUDE_DIRECTORIES "${INTERNAL_INCLUDES}")