From a1266e3586577fad3457d7290c3d9c20df89112f Mon Sep 17 00:00:00 2001 From: Jeremy Ong Date: Mon, 3 Oct 2016 10:48:38 -0700 Subject: [PATCH] Ensure that the CMAKE_MODULE_PATH is set correctly even if this project is transitively linked In the case that the cpp-driver is built as a transitively linked library (aka embedded in another CMake project), the module path will be augmented relative to the project root instead of this project. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3ae402400..4ba060bbc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 2.6.4) # Ensure functions/modules are available -set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/modules/") +set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/") set(PROJECT_NAME_STR cassandra) set(PROJECT_LIB_NAME ${PROJECT_NAME_STR})