From 360abbe5bfae342564c82a80bb5376d09c24b01f Mon Sep 17 00:00:00 2001 From: Craig Hutchinson <54269136+CraigHutchinson@users.noreply.github.com> Date: Tue, 28 Feb 2023 14:41:37 +0000 Subject: [PATCH] CMake: append should be used for CMAKE_MODULE_PATH - Additionally hardened paths by using PROJECT_SOURCE_DIR --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8616b2f2..d201bc6d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -121,8 +121,8 @@ if (MAIN_PROJECT) endif() # Specify the list of directories to search for cmake modules. -set(CMAKE_MODULE_PATH - "${CMAKE_CURRENT_SOURCE_DIR}/cmake" +list(APPEND CMAKE_MODULE_PATH + "${PROJECT_SOURCE_DIR}/cmake" ) #-------------------------------------------------------------------------------