X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/34183f01fa5fb9c81919d6f04ccac8a927a36504..9fd6cbc6c3b06f4b09e3c3339ffb3cc8a68f9bfa:/tools/cmake/Modules/FindNS3.cmake diff --git a/tools/cmake/Modules/FindNS3.cmake b/tools/cmake/Modules/FindNS3.cmake index 2fc3f7688b..d036843925 100644 --- a/tools/cmake/Modules/FindNS3.cmake +++ b/tools/cmake/Modules/FindNS3.cmake @@ -13,10 +13,10 @@ # - No proper find_package() integration ## ADDING A NS3 VERSION. -# - Add ns3.${version}-core to the NAME line of the find_library below -# - Add include/ns3{version} to the PATH_SUFFIXES line of the find_path below +# - Add "ns3.${version}-core ns3.${version}-core-debug ns3.${version}-core-optimized" to the NAME line of the find_library below +# - Add "include/ns3{version}" to the PATH_SUFFIXES line of the find_path below -set(HAVE_NS3 0) +set(SIMGRID_HAVE_NS3 0) set(NS3_HINT ${ns3_path} CACHE PATH "Path to search for NS3 lib and include") find_library(NS3_LIBRARIES @@ -50,7 +50,7 @@ mark_as_advanced(NS3_LIBRARIES) if(NS3_INCLUDE_DIR) if(NS3_LIBRARIES) - set(HAVE_NS3 1) + set(SIMGRID_HAVE_NS3 1) if(NS3_LIBRARIES MATCHES "-optimized") set (NS3_SUFFIX "-optimized") elseif(NS3_LIBRARIES MATCHES "-debug") @@ -64,13 +64,13 @@ if(NS3_INCLUDE_DIR) # Compute NS3_PATH string(REGEX REPLACE "(.*)/lib" "\\1" NS3_PATH "${NS3_LIBRARY_PATH}") - - message(STATUS "NS-3 found (v3.${NS3_VERSION} in ${NS3_PATH}).") - if (NOT NS3_LIBRARY_PATH STREQUAL "/usr/lib") + message(STATUS "NS-3 found (v${NS3_VERSION}; incl:${NS3_INCLUDE_DIR}; lib: ${NS3_LIBRARY_PATH}).") + + if (NOT NS3_LIBRARY_PATH STREQUAL "/usr/lib") string(REGEX MATCH "${NS3_LIBRARY_PATH}" MatchResult "$ENV{LD_LIBRARY_PATH}") if(NOT MatchResult) - message(STATUS "Warning: NS3 not installed in system path, and not listed in LD_LIBRARY_PATH." + message(STATUS "Warning: NS3 not installed in system path, and not listed in LD_LIBRARY_PATH." " You want to: export LD_LIBRARY_PATH=${NS3_LIBRARY_PATH}\${LD_LIBRARY_PATH:+:\$LD_LIBRARY_PATH}") endif() endif() @@ -78,7 +78,7 @@ if(NS3_INCLUDE_DIR) endif() mark_as_advanced(NS3_LIBRARY_PATH) -if(HAVE_NS3) +if(SIMGRID_HAVE_NS3) link_directories(${NS3_LIBRARY_PATH}) include_directories(${NS3_INCLUDE_DIR}) else()