Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Action replayer: remove dirty hacks, they didn't work anyway
[simgrid.git] / examples / amok / saturate / CMakeLists.txt
index 920a64d..651c0de 100644 (file)
@@ -5,7 +5,7 @@ set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/_saturate_simulator.c
                                                        ${CMAKE_CURRENT_BINARY_DIR}/_saturate_sensor.c
                                                        PROPERTIES GENERATED true)
                                                        
-set(EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_SOURCE_DIR}")
+set(EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_BINARY_DIR}")
 
 add_executable(saturate_simulator      ${CMAKE_CURRENT_BINARY_DIR}/_saturate_simulator.c
                                                                        ${CMAKE_CURRENT_SOURCE_DIR}/saturate.c)
@@ -20,9 +20,16 @@ add_custom_command(
                                                        ${CMAKE_CURRENT_BINARY_DIR}/_saturate_sensor.c
                                        DEPENDS gras_stub_generator ${CMAKE_CURRENT_SOURCE_DIR}/saturate.xml
                                        COMMAND ${CMAKE_BINARY_DIR}/bin/gras_stub_generator saturate ${CMAKE_CURRENT_SOURCE_DIR}/saturate.xml
+                                       WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
                                        )
                                        
 ### Add definitions for compile
+if(NOT WIN32)
 target_link_libraries(saturate_simulator simgrid pthread m )
 target_link_libraries(saturate_maestro gras pthread m )
-target_link_libraries(saturate_sensor gras pthread m )
\ No newline at end of file
+target_link_libraries(saturate_sensor gras pthread m )
+else(NOT WIN32)
+target_link_libraries(saturate_simulator simgrid)
+target_link_libraries(saturate_maestro gras)
+target_link_libraries(saturate_sensor gras)
+endif(NOT WIN32)
\ No newline at end of file