### Need to set rc ccompiler before enable language
if(WIN32)
SET(CMAKE_RC_COMPILER "windres")
+ set(LIBRARIES_DEP simgrid pcre ws2_32 pthread)
+else(WIN32)
+ set(LIBRARIES_DEP simgrid pcre pthread)
endif(WIN32)
project(MY_SIMGRID_PROJECT C)
###############################
# Test the build dependencies #
###############################
-include(FindPCRE.cmake)
+include(FindPcreWin.cmake)
message(STATUS "Looking for lib Simgrid")
if("$ENV{SIMGRID_ROOT}" STREQUAL "")
message(STATUS "Looking for lib Simgrid - Not found")
include_directories($ENV{SIMGRID_ROOT}/include)
include_directories($ENV{SIMGRID_ROOT}/src)
include_directories($ENV{SIMGRID_ROOT}/src/include)
- add_library(libsimgrid STATIC IMPORTED)
message(STATUS "Looking for lib Simgrid - found")
endif("$ENV{SIMGRID_ROOT}" STREQUAL "")
add_executable(${target} "${target}.c")
message(STATUS "source_file: ${target}.c")
message(STATUS "target name: ${target}.exe")
- # Any targets need to be linked with simgrid and pcre
- target_link_libraries(${target} simgrid pcre)
+ # Any targets need to be linked with libraries
+ target_link_libraries(${target} ${LIBRARIES_DEP})
endforeach(target ${SOURCE_FILE})