diff --git a/CMakeLists.txt b/CMakeLists.txt index 911b2f12..f8cb3093 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -32,7 +32,8 @@ if(ENABLE_GNOME_NETWORKMANAGER) pkg_check_modules(GLIB REQUIRED glib-2.0) pkg_check_modules(LIBNM REQUIRED libnm) else() -find_package(IARMBus REQUIRED) +find_package(IARMBus) +include(Tests/l1networkmanager.cmake) endif () diff --git a/l1networkmanager.cmake b/Tests/l1networkmanager.cmake similarity index 95% rename from l1networkmanager.cmake rename to Tests/l1networkmanager.cmake index 4466647a..2f94ec64 100644 --- a/l1networkmanager.cmake +++ b/Tests/l1networkmanager.cmake @@ -2,7 +2,7 @@ message("Building for unit tests...") message("Generating empty headers to suppress compiler errors") -file(GLOB BASEDIR Tests) +file(GLOB BASEDIR "${CMAKE_CURRENT_SOURCE_DIR}") set(BASEDIR ${BASEDIR}/headers) set(EMPTY_HEADERS_DIRS ${BASEDIR} @@ -33,7 +33,7 @@ include_directories(${EMPTY_HEADERS_DIRS}) message("Adding compiler and linker options for all targets") -file(GLOB BASEDIR Tests/mocks) +file(GLOB BASEDIR mocks) set(FAKE_HEADERS ${BASEDIR}/Iarm.h )