From af92ecdd6a297016026ca198734634878ae9de7a Mon Sep 17 00:00:00 2001 From: kervala Date: Sun, 29 Nov 2015 14:11:17 +0100 Subject: [PATCH] Fixed: ROOT_DIR is the parent of CMAKE_SOURCE_DIR --- code/CMakeModules/GetRevision.cmake | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/code/CMakeModules/GetRevision.cmake b/code/CMakeModules/GetRevision.cmake index f760e0420..d7d36fd17 100644 --- a/code/CMakeModules/GetRevision.cmake +++ b/code/CMakeModules/GetRevision.cmake @@ -20,7 +20,10 @@ IF(SOURCE_DIR) ENDIF() ELSE() SET(SOURCE_DIR ${CMAKE_SOURCE_DIR}) - SET(ROOT_DIR ${CMAKE_SOURCE_DIR}) + SET(ROOT_DIR ${CMAKE_SOURCE_DIR}/..) + + # convert ROOT_DIR to absolute path + GET_FILENAME_COMPONENT(ROOT_DIR ${ROOT_DIR} ABSOLUTE) ENDIF() MACRO(NOW RESULT)