]> Creatis software - clitk.git/commitdiff
Fixed issue when the package is called from another directory
authorSimon Rit <simon.rit@creatis.insa-lyon.fr>
Fri, 3 Feb 2012 17:14:34 +0000 (18:14 +0100)
committerSimon Rit <simon.rit@creatis.insa-lyon.fr>
Fri, 3 Feb 2012 17:14:34 +0000 (18:14 +0100)
cmake/FindGengetopt.cmake

index aecb1fc207f8d3e52f93e71530eadbf1ff678d18..8d7380e19e7ec9a9f4986990539113dcf6ab5eaa 100644 (file)
@@ -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})