Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add simgrid dependency for bindings.
[simgrid.git] / buildtools / Cmake / MakeExeLib.cmake
index 9b96684..58046e1 100644 (file)
@@ -3,9 +3,9 @@
 if(enable_supernovae)
        include(${PROJECT_DIRECTORY}/buildtools/Cmake/Supernovae.cmake)
 else(enable_supernovae)        
-       add_library(simgrid SHARED ${simgrid_sources} ${PROJECT_DIRECTORY}/include/xbt/graphxml.h)
-       add_library(simgrid_static STATIC ${simgrid_sources} ${PROJECT_DIRECTORY}/include/xbt/graphxml.h)
-       add_library(gras SHARED ${gras_sources} ${PROJECT_DIRECTORY}/include/xbt/graphxml.h)
+       add_library(simgrid SHARED ${simgrid_sources})
+       add_library(simgrid_static STATIC ${simgrid_sources})
+       add_library(gras SHARED ${gras_sources})
        if(enable_smpi)
                add_library(smpi SHARED ${SMPI_SRC})
        endif(enable_smpi)
@@ -30,7 +30,7 @@ if(HAVE_RUBY)
          COMMENT "Generating libsimgrid.so link for binding ruby..."
        )
        ADD_CUSTOM_TARGET(link_simgrid_ruby ALL
-                         DEPENDS ${PROJECT_DIRECTORY}/src/bindings/ruby/libsimgrid.so)       
+                         DEPENDS simgrid ${PROJECT_DIRECTORY}/src/bindings/ruby/libsimgrid.so)
 endif(HAVE_RUBY)
 
 if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
@@ -55,9 +55,13 @@ if(HAVE_LUA)
          COMMENT "Generating libsimgrid.so link for binding lua..."
        )
        ADD_CUSTOM_TARGET(link_simgrid_lua ALL
-                         DEPENDS ${PROJECT_DIRECTORY}/examples/lua/simgrid.so)       
+                         DEPENDS simgrid ${PROJECT_DIRECTORY}/examples/lua/simgrid.so)
 endif(HAVE_LUA)
 
+if(HAVE_CGRAPH_H)
+       SET(SIMGRID_DEP "${SIMGRID_DEP} -lcgraph")
+endif(HAVE_CGRAPH_H)
+
 if(HAVE_GTNETS)
        SET(SIMGRID_DEP "${SIMGRID_DEP} -lgtnets")
 endif(HAVE_GTNETS)
@@ -71,6 +75,10 @@ target_link_libraries(simgrid        ${SIMGRID_DEP})
 target_link_libraries(simgrid_static   ${SIMGRID_DEP})
 target_link_libraries(gras     ${GRAS_DEP})
 
+add_dependencies(gras maintainer_files)
+add_dependencies(simgrid maintainer_files)
+add_dependencies(simgrid_static maintainer_files)
+                               
 if(enable_smpi)
        target_link_libraries(smpi      simgrid ${SMPI_DEP})
 endif(enable_smpi)
@@ -147,9 +155,12 @@ add_subdirectory(${PROJECT_DIRECTORY}/examples/amok/saturate)
 
 add_subdirectory(${PROJECT_DIRECTORY}/examples/simdag)
 add_subdirectory(${PROJECT_DIRECTORY}/examples/simdag/dax)
+if(HAVE_CGRAPH_H)
+add_subdirectory(${PROJECT_DIRECTORY}/examples/simdag/dot)
+endif(HAVE_CGRAPH_H)
 add_subdirectory(${PROJECT_DIRECTORY}/examples/simdag/metaxml)
 add_subdirectory(${PROJECT_DIRECTORY}/examples/simdag/properties)
 add_subdirectory(${PROJECT_DIRECTORY}/examples/simdag/scheduling)
 if(enable_smpi)
        add_subdirectory(${PROJECT_DIRECTORY}/examples/smpi)
-endif(enable_smpi)
\ No newline at end of file
+endif(enable_smpi)