From a00101cc021c43827ccdf24375d602c1fe10f970 Mon Sep 17 00:00:00 2001 From: Peter LaValle Date: Sun, 31 May 2015 11:57:33 +0100 Subject: [PATCH] changes to allow embedding changes several usages of CMAKE_SOURCE_DIR to CMAKE_CURRENT_SOURCE_DIR which allow embedding the assimp build in a larger CMake project ... as an alternative to dependency-hell --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index eb021dc57..03073f644 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,7 +23,7 @@ add_definitions( -DOPENDDL_NO_USE_CPP11 ) # Get the current working branch execute_process( COMMAND git rev-parse --abbrev-ref HEAD - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} OUTPUT_VARIABLE GIT_BRANCH OUTPUT_STRIP_TRAILING_WHITESPACE ) @@ -31,7 +31,7 @@ execute_process( # Get the latest abbreviated commit hash of the working branch execute_process( COMMAND git log -1 --format=%h - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} OUTPUT_VARIABLE GIT_COMMIT_HASH OUTPUT_STRIP_TRAILING_WHITESPACE )