From b67fb73fb4f9605d9413d5e543fa633750a2dd76 Mon Sep 17 00:00:00 2001 From: Pavel Krajcevski Date: Tue, 18 Nov 2014 17:17:16 -0500 Subject: [PATCH] If we're in the build tree, we know where the source is --- CMakeModules/FasTCConfig.cmake.in | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/CMakeModules/FasTCConfig.cmake.in b/CMakeModules/FasTCConfig.cmake.in index 71f0264..3c2eb93 100644 --- a/CMakeModules/FasTCConfig.cmake.in +++ b/CMakeModules/FasTCConfig.cmake.in @@ -11,10 +11,17 @@ IF(NOT TARGET FasTCBase) FOREACH(LIB ${FasTC_LIBRARIES}) STRING(REPLACE "FasTC" "" DIR "${LIB}") - SET(CURRENT_DIR "${CMAKE_CURRENT_LIST_DIR}/${DIR}/include") + + SET(CURRENT_DIR "@FasTC_SOURCE_DIR@/${DIR}/include") IF( EXISTS "${CURRENT_DIR}/" ) SET(FasTC_INCLUDE_DIRS ${FasTC_INCLUDE_DIRS} ${CURRENT_DIR}) ENDIF() + + SET(CURRENT_DIR "@FasTC_BINARY_DIR@/${DIR}/include") + IF( EXISTS "${CURRENT_DIR}/" ) + SET(FasTC_INCLUDE_DIRS ${FasTC_INCLUDE_DIRS} ${CURRENT_DIR}) + ENDIF() + ENDFOREACH() SET(FasTC_EXECUTABLES tc compare decomp)