From e14bc09340c3ecb3c5370ce86b5b0afa572254be Mon Sep 17 00:00:00 2001 From: Simon Rit Date: Fri, 3 Feb 2012 18:14:34 +0100 Subject: [PATCH] Fixed issue when the package is called from another directory --- cmake/FindGengetopt.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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}) -- 2.47.1