From e72cfb6afbaa2599c2204df3f2c0df423a2188e8 Mon Sep 17 00:00:00 2001 From: Lars Moons Date: Tue, 16 Aug 2022 19:47:53 +0000 Subject: [PATCH] add support for out-of-source tree builds with add_subdirectory(ns-3-dev) --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ed35aac93..425ae7e8e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -103,10 +103,10 @@ set(NS3_DISABLED_MODULES "" include(build-support/macros-and-definitions.cmake) # Scan module libraries -subdirlist(libs_to_build ${CMAKE_SOURCE_DIR}/src) +subdirlist(libs_to_build ${CMAKE_CURRENT_SOURCE_DIR}/src) # Scan contribution libraries -subdirlist(contrib_libs_to_build ${CMAKE_SOURCE_DIR}/contrib) +subdirlist(contrib_libs_to_build ${CMAKE_CURRENT_SOURCE_DIR}/contrib) # Before filtering, we need to load settings from .ns3rc parse_ns3rc(ns3rc_enabled_modules ns3rc_examples_enabled ns3rc_tests_enabled)