X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/81606342f748dd45f481abe9171bccf7deac0fa5..824bae4e2372b3a06cae65e3b976a0c3eca723a5:/tools/cmake/Modules/FindNS3.cmake diff --git a/tools/cmake/Modules/FindNS3.cmake b/tools/cmake/Modules/FindNS3.cmake index 6dd95aa053..2fc3f7688b 100644 --- a/tools/cmake/Modules/FindNS3.cmake +++ b/tools/cmake/Modules/FindNS3.cmake @@ -20,7 +20,7 @@ set(HAVE_NS3 0) set(NS3_HINT ${ns3_path} CACHE PATH "Path to search for NS3 lib and include") find_library(NS3_LIBRARIES - NAME ns3-core ns3.14-core ns3.15-core ns3.16-core ns3.17-core ns3.18-core ns3.19-core ns3.20-core ns3.21-core ns3.22-core ns3.25-core ns3.26-core ns3.27-core ns3.28-core + NAME ns3-core ns3.14-core ns3.15-core ns3.16-core ns3.17-core ns3.18-core ns3.19-core ns3.20-core ns3.21-core ns3.22-core ns3.25-core ns3.26-core ns3.26-core-optimized ns3.26-core-debug ns3.27-core ns3.27-core-optimized ns3.27-core-debug ns3.28-core ns3.28-core-optimized ns3.28-core-debug PATH_SUFFIXES lib64 lib ns3/lib PATHS ${NS3_HINT} @@ -51,7 +51,14 @@ mark_as_advanced(NS3_LIBRARIES) if(NS3_INCLUDE_DIR) if(NS3_LIBRARIES) set(HAVE_NS3 1) - + if(NS3_LIBRARIES MATCHES "-optimized") + set (NS3_SUFFIX "-optimized") + elseif(NS3_LIBRARIES MATCHES "-debug") + set (NS3_SUFFIX "-debug") + else() + set (NS3_SUFFIX "") + endif() + string(REGEX REPLACE ".*ns([.0-9]+)-core.*" "\\1" NS3_VERSION "${NS3_LIBRARIES}") get_filename_component(NS3_LIBRARY_PATH "${NS3_LIBRARIES}" PATH)