From ad37908cbe686a3233465ccd89abf90402b261ff Mon Sep 17 00:00:00 2001 From: Simon Rit Date: Sun, 5 Feb 2012 10:53:13 +0100 Subject: [PATCH] Fixed cmake version problem --- cmake/FindGengetopt.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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}) -- 2.47.1