Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Ensure that additional include/link directories for libpcre are added at the end...
[simgrid.git] / buildtools / Cmake / Modules / FindNS3.cmake
index c8e34bb..5f7ca63 100644 (file)
@@ -1,44 +1,28 @@
+# If you use NS-3 version 3.14 (prefer used at most 3.13) be sure having do
+# ln -sf libns3.14.1-applications-debug.so libns3-applications.so
+# ln -sf libns3.14.1-internet-debug.so libns3-internet.so
+# ln -sf libns3.14.1-point-to-point-debug.so libns3-point-to-point.so
+# ln -sf libns3.14.1-csma-debug.so libns3-csma.so
+# ln -sf libns3.14.1-core-debug.so libns3-core.so
+
 find_library(HAVE_NS3_LIB
     NAME ns3
-    HINTS
-    $ENV{LD_LIBRARY_PATH}
-    $ENV{HOME}
     PATH_SUFFIXES lib64 lib ns3/lib
     PATHS
-    /opt
-    /opt/local
-    /opt/csw
-    /sw
-    /usr
     ${ns3_path}
 )
 
 find_library(HAVE_NS3_CORE_LIB
     NAME ns3-core
-    HINTS
-    $ENV{LD_LIBRARY_PATH}
-    $ENV{HOME}
     PATH_SUFFIXES lib64 lib ns3/lib
     PATHS
-    /opt
-    /opt/local
-    /opt/csw
-    /sw
-    /usr
     ${ns3_path}
 )
 
 find_path(HAVE_CORE_MODULE_H
        NAME ns3/core-module.h
-    HINTS
-    $ENV{HOME}
-    PATH_SUFFIXES include ns3/include
+    PATH_SUFFIXES include ns3/include include/ns3.14.1
     PATHS
-    /opt
-    /opt/local
-    /opt/csw
-    /sw
-    /usr
     ${ns3_path}
 )
 
@@ -64,6 +48,7 @@ message(STATUS "Looking for lib ns3-core - found")
 else(HAVE_NS3_CORE_LIB)
 message(STATUS "Looking for lib ns3-core - not found")
 endif(HAVE_NS3_CORE_LIB)
+
 mark_as_advanced(HAVE_NS3_LIB)
 mark_as_advanced(HAVE_NS3_CORE_LIB)
 
@@ -86,7 +71,6 @@ if(HAVE_NS3)
        string(REGEX MATCH "${HAVE_NS3_LIB}" operation "$ENV{LD_LIBRARY_PATH}")
        if(NOT operation)
                message(STATUS "Warning: To use NS-3 don't forget to set LD_LIBRARY_PATH with:  export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${HAVE_NS3_LIB}")
-               set(HAVE_NS3 0)
        else(NOT operation)
        
                string(REGEX MATCH "-L${HAVE_NS3_LIB} " operation1 "${CMAKE_C_FLAGS}")
@@ -102,9 +86,9 @@ if(HAVE_NS3)
                SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}-I${HAVE_CORE_MODULE_H} -L${HAVE_NS3_LIB} ")
        endif(NOT operation)            
 else(HAVE_NS3)
-    message(STATUS "Warning: To use NS-3 Please install ns3 at least version 3.10 (http://www.nsnam.org/releases/)")
+        message(STATUS "Warning: To use NS-3 Please install ns3 at least version 3.10 (http://www.nsnam.org/releases/)")
 endif(HAVE_NS3)
 
 if(HAVE_NS3 AND enable_supernovae)
     set(enable_supernovae OFF)
-endif(HAVE_NS3 AND enable_supernovae)
\ No newline at end of file
+endif(HAVE_NS3 AND enable_supernovae)