]> AND Public Git Repository - simgrid.git/blobdiff - buildtools/Cmake/MakeExeLib.cmake
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Cosmetics.
[simgrid.git] / buildtools / Cmake / MakeExeLib.cmake
index 10c9e318cefe1faf390de562b32c3383d31bee7a..2d2073d036537fc9eb5ede0ecc4c15bd34d32758 100644 (file)
@@ -1,8 +1,9 @@
 ### Make Libs
+include(FindSupernovae)
 
-if(enable_supernovae)
+if(enable_supernovae AND HAVE_SUPERNOVAE_TOOLS)
        include(${PROJECT_DIRECTORY}/buildtools/Cmake/Supernovae.cmake)
-else(enable_supernovae)        
+else(enable_supernovae AND HAVE_SUPERNOVAE_TOOLS)      
        add_library(simgrid SHARED ${simgrid_sources})
        add_library(gras SHARED ${gras_sources})
        if(enable_lib_static)
@@ -14,7 +15,7 @@ else(enable_supernovae)
                        add_library(smpi_static STATIC ${SMPI_SRC})     
                endif(enable_lib_static)
        endif(enable_smpi)
-endif(enable_supernovae)
+endif(enable_supernovae AND HAVE_SUPERNOVAE_TOOLS)
 
 set_target_properties(simgrid PROPERTIES VERSION ${libsimgrid_version})
 set_target_properties(gras PROPERTIES VERSION ${libgras_version})
@@ -57,7 +58,7 @@ if(pthread)
 endif(pthread)
 
 if(HAVE_LUA)
-       SET(SIMGRID_DEP "${SIMGRID_DEP} -ldl -l${liblua}")   
+       SET(SIMGRID_DEP "${SIMGRID_DEP} -ldl -l${LIB_LUA_NAME}")   
          
     ADD_CUSTOM_TARGET(link_simgrid_lua ALL
       DEPENDS  simgrid
@@ -80,9 +81,19 @@ if(HAVE_LUA)
        )
 endif(HAVE_LUA)
 
-if(HAVE_CGRAPH_LIB AND HAVE_CGRAPH_H)
-       SET(SIMGRID_DEP "${SIMGRID_DEP} -lcgraph")
-endif(HAVE_CGRAPH_LIB AND HAVE_CGRAPH_H)
+if(enable_graphviz AND HAVE_CDT_LIB)
+if(HAVE_AGRAPH_H OR HAVE_CGRAPH_H)
+
+    if(HAVE_CGRAPH_LIB)
+           SET(SIMGRID_DEP "${SIMGRID_DEP} -lcgraph")
+       else(HAVE_CGRAPH_LIB)
+        if(HAVE_AGRAPH_LIB)
+           SET(SIMGRID_DEP "${SIMGRID_DEP} -lagraph -lcdt")
+        endif(HAVE_AGRAPH_LIB) 
+    endif(HAVE_CGRAPH_LIB)
+           
+endif(HAVE_AGRAPH_H OR HAVE_CGRAPH_H)
+endif(enable_graphviz AND HAVE_CDT_LIB)
 
 if(HAVE_GTNETS)
        SET(SIMGRID_DEP "${SIMGRID_DEP} -lgtnets")
@@ -185,9 +196,9 @@ add_subdirectory(${PROJECT_DIRECTORY}/examples/amok/saturate)
 
 add_subdirectory(${PROJECT_DIRECTORY}/examples/simdag)
 add_subdirectory(${PROJECT_DIRECTORY}/examples/simdag/dax)
-if(HAVE_CGRAPH_H)
+if(enable_graphviz)
 add_subdirectory(${PROJECT_DIRECTORY}/examples/simdag/dot)
-endif(HAVE_CGRAPH_H)
+endif(enable_graphviz)
 add_subdirectory(${PROJECT_DIRECTORY}/examples/simdag/metaxml)
 add_subdirectory(${PROJECT_DIRECTORY}/examples/simdag/properties)
 add_subdirectory(${PROJECT_DIRECTORY}/examples/simdag/scheduling)