X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=CMakeLists.txt;h=6fe2e34e275ee708f07ae74bf40e73bdd7a75366;hb=a48894959f4e7df71c77c91da5e8723b2697a79c;hp=8ce5b58371c0804f5ff99368987b438c9306422d;hpb=9c2eac98fa5e9a48f3566aeb4e07d5052ee3cf89;p=clitk.git diff --git a/CMakeLists.txt b/CMakeLists.txt index 8ce5b58..6fe2e34 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ #========================================================= # CLITK = Command Line ITK -cmake_minimum_required(VERSION 2.4) -cmake_policy(VERSION 2.4) +cmake_minimum_required(VERSION 2.8) +cmake_policy(VERSION 2.8) if(COMMAND cmake_policy) cmake_policy(SET CMP0003 NEW) endif(COMMAND cmake_policy) @@ -42,11 +42,9 @@ ENDIF(VTK_FOUND) #========================================================= #========================================================= -# Find gengetopt -FIND_PATH(CLITK_GENGETOPT gengetopt) -IF (CLITK_GENGETOPT STREQUAL "CLITK_GENGETOPT-NOTFOUND") - MESSAGE("gengetopt not found, please install it (see http://www.gnu.org/software/gengetopt/gengetopt.html)") -ENDIF (CLITK_GENGETOPT STREQUAL "CLITK_GENGETOPT-NOTFOUND") +# Find gengetopt, will create a target exe if not found +SET(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH}) +FIND_PACKAGE(Gengetopt) #========================================================= #=========================================================