From bdcb7cc12b6c27c0cf008378381c6812a03b3bae Mon Sep 17 00:00:00 2001 From: Jan Solanti Date: Fri, 10 Mar 2017 19:42:10 +0200 Subject: [PATCH] Fix building as a git submodule. CMAKE_SOURCE_DIR points at the root project's source dir, which is wrong when building squirrel as a git submodule. CMAKE_CURRENT_SOURCE_DIR points at the dir of the current CMakeLists.txt and thus should be used most of the time. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 42185e1..00bf8f8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,7 +9,7 @@ set(CMAKE_BUILD_TYPE "Release" CACHE STRING "") project(squirrel C CXX) -include_directories(${CMAKE_SOURCE_DIR}/include) +include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include) if(CMAKE_COMPILER_IS_GNUCXX) set(SQ_FLAGS -fno-exceptions -fno-strict-aliasing -Wall -Wextra -pedantic -Wcast-qual)