From 4ac6928fc2a0bf806bbcaa3bea898b5ff018a164 Mon Sep 17 00:00:00 2001 From: Abdessattar Sassi <457645+abdes@users.noreply.github.com> Date: Fri, 16 Sep 2022 21:32:25 +0400 Subject: [PATCH] fix: #16 use CMAKE_CURRENT_SOURCE_DIR instead of CMAKE_SOURCE_DIR for cmake includes This has the benefit of working better and more reliably when the project is included in another master project. We can guarantee that the includes still come from the sub-project as expected. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 49a480e..242d571 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,7 +15,7 @@ cmake_minimum_required(VERSION 3.14) # List of directories specifying a search path for CMake modules to be loaded by # the the include() or find_package() commands before checking the default # modules that come with CMake. -list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake) +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake) # ------------------------------------------------------------------------------ # Project description and (meta) information