From: Simon Rit Date: Sun, 5 Feb 2012 09:53:13 +0000 (+0100) Subject: Fixed cmake version problem X-Git-Tag: v1.3.0~104^2~3 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=ad37908cbe686a3233465ccd89abf90402b261ff;p=clitk.git Fixed cmake version problem --- diff --git a/cmake/FindGengetopt.cmake b/cmake/FindGengetopt.cmake index 8d7380e..7766542 100644 --- a/cmake/FindGengetopt.cmake +++ b/cmake/FindGengetopt.cmake @@ -2,7 +2,8 @@ # Attempt to find gengetopt. If not found, compile it. FIND_PROGRAM(GENGETOPT gengetopt) IF (GENGETOPT STREQUAL "GENGETOPT-NOTFOUND") - ADD_SUBDIRECTORY(${CMAKE_CURRENT_LIST_DIR}/gengetopt ${CMAKE_CURRENT_BINARY_DIR}/gengetopt) + GET_FILENAME_COMPONENT(CLITK_CMAKE_DIR ${CMAKE_CURRENT_LIST_FILE} PATH) + ADD_SUBDIRECTORY(${CLITK_CMAKE_DIR}/gengetopt ${CMAKE_CURRENT_BINARY_DIR}/gengetopt) ELSE(GENGETOPT STREQUAL "GENGETOPT-NOTFOUND") ADD_EXECUTABLE(gengetopt IMPORTED) SET_PROPERTY(TARGET gengetopt PROPERTY IMPORTED_LOCATION ${GENGETOPT})