From: Simon Rit Date: Fri, 3 Feb 2012 17:14:34 +0000 (+0100) Subject: Fixed issue when the package is called from another directory X-Git-Tag: v1.3.0~104^2~7 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=e14bc09340c3ecb3c5370ce86b5b0afa572254be;p=clitk.git Fixed issue when the package is called from another directory --- diff --git a/cmake/FindGengetopt.cmake b/cmake/FindGengetopt.cmake index aecb1fc..8d7380e 100644 --- a/cmake/FindGengetopt.cmake +++ b/cmake/FindGengetopt.cmake @@ -2,7 +2,7 @@ # Attempt to find gengetopt. If not found, compile it. FIND_PROGRAM(GENGETOPT gengetopt) IF (GENGETOPT STREQUAL "GENGETOPT-NOTFOUND") - ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/cmake/gengetopt) + ADD_SUBDIRECTORY(${CMAKE_CURRENT_LIST_DIR}/gengetopt ${CMAKE_CURRENT_BINARY_DIR}/gengetopt) ELSE(GENGETOPT STREQUAL "GENGETOPT-NOTFOUND") ADD_EXECUTABLE(gengetopt IMPORTED) SET_PROPERTY(TARGET gengetopt PROPERTY IMPORTED_LOCATION ${GENGETOPT})