]> AND Public Git Repository - simgrid.git/blobdiff - tools/cmake/Modules/FindNS3.cmake
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of https://framagit.org/simgrid/simgrid
[simgrid.git] / tools / cmake / Modules / FindNS3.cmake
index b97e23540f0a49d9f7edfb75caa87d616df8d93a..7154c2bb3bf36f5f7e78e0b8e52ad443084e6d0a 100644 (file)
@@ -42,7 +42,7 @@ if(NS3_FOUND) # Starting from 3.36, ns3 provides a working pkg-config file, maki
 else()
   set(NS3_HINT ${ns3_path} CACHE PATH "Path to search for NS3 lib and include")
 
-  set(NS3_KNOWN_VERSIONS "3.28" "3.29" "3.30" "3.31" "3.32" "3.33" "3.34" "3.35")
+  set(NS3_KNOWN_VERSIONS "3-dev" "3.28" "3.29" "3.30" "3.31" "3.32" "3.33" "3.34" "3.35") # subsequent versions use pkg-config
 
   foreach (_ns3_ver ${NS3_KNOWN_VERSIONS})
     list(APPEND _ns3_LIB_SEARCH_DIRS "ns${_ns3_ver}-core" "ns${_ns3_ver}-core-optimized" "ns${_ns3_ver}-core-debug" "ns${_ns3_ver}-core-default")
@@ -119,6 +119,11 @@ else()
     endif()
   endif()
   mark_as_advanced(NS3_LIBRARY_PATH)
+
+  set(NS3_LIBRARIES "")
+  foreach(lib core csma point-to-point internet network applications wifi)
+    set(NS3_LIBRARIES "${NS3_LIBRARIES} -lns${NS3_VERSION}-${lib}${NS3_SUFFIX}")
+  endforeach()
 endif()
 
 if(SIMGRID_HAVE_NS3)