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.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
+ 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 ns3.29-core ns3.29-core-optimized ns3.29-core-debug
PATH_SUFFIXES lib64 lib ns3/lib
PATHS
${NS3_HINT}
find_path(NS3_INCLUDE_DIR
NAME ns3/core-module.h
- PATH_SUFFIXES include ns3/include include/ns3.14 include/ns3.15 include/ns3.16 include/ns3.17 include/ns3.18 include/ns3.19 include/ns3.20 include/ns3.21 include/ns3.22 include/ns3.25 include/ns3.26 include/ns3.27 include/ns3.28
+ PATH_SUFFIXES include ns3/include include/ns3.14 include/ns3.15 include/ns3.16 include/ns3.17 include/ns3.18 include/ns3.19 include/ns3.20 include/ns3.21 include/ns3.22 include/ns3.25 include/ns3.26 include/ns3.27 include/ns3.28 include/ns3.29
PATHS
${NS3_HINT}
)
# Compute NS3_PATH
string(REGEX REPLACE "(.*)/lib" "\\1" NS3_PATH "${NS3_LIBRARY_PATH}")
-
+
message(STATUS "NS-3 found (v${NS3_VERSION}; incl:${NS3_INCLUDE_DIR}; lib: ${NS3_LIBRARY_PATH}).")
- if (NOT NS3_LIBRARY_PATH STREQUAL "/usr/lib")
+ 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()