X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=sidebyside;f=CMakeLists.txt;h=2c9769bab4b0c7a8b865ceb9fe5bba597610cde7;hb=b35b8691933b2d7f34b7f00dd817a14be7bb5ab2;hp=e652e5bd96773dc08b03a8a94fa87ae8216f466a;hpb=8cf92baeeefc45bc80a2d0eb2850e04b6089111f;p=FrontAlgorithms.git diff --git a/CMakeLists.txt b/CMakeLists.txt index e652e5b..2c9769b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,30 +1,33 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 2.6) - -# for CMake 2.6 corrected behaviour (see "cmake --help-policy CMP0003") -IF( - COMMAND cmake_policy AND - ${CMAKE_MAJOR_VERSION} EQUAL 2 AND - ${CMAKE_MINOR_VERSION} GREATER 4 - ) - CMAKE_POLICY(SET CMP0003 NEW) - CMAKE_POLICY(SET CMP0005 NEW) - CMAKE_POLICY(SET CMP0011 NEW) - CMAKE_POLICY(SET CMP0012 NEW) -ENDIF( - COMMAND cmake_policy AND - ${CMAKE_MAJOR_VERSION} EQUAL 2 AND - ${CMAKE_MINOR_VERSION} GREATER 4 +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +## ============ +## = Policies = +## ============ + +SET( + policies + CMP0015 + CMP0020 + CMP0042 ) +FOREACH(policy ${policies}) + IF(POLICY ${policy}) + CMAKE_POLICY(SET ${policy} NEW) + ENDIF(POLICY ${policy}) +ENDFOREACH(policy) ## ================ ## = Project name = ## ================ PROJECT(FrontAlgorithms) -SET(FrontAlgorithms_MAJOR_VERSION "0") -SET(FrontAlgorithms_MINOR_VERSION "0") -SET(FrontAlgorithms_RELEASE_VERSION "1") -SET(FrontAlgorithms_VERSION "${FrontAlgorithms_MAJOR_VERSION}.${FrontAlgorithms_MINOR_VERSION}.${FrontAlgorithms_RELEASE_VERSION}") +SET(prj_MAJOR_VERSION "0") +SET(prj_MINOR_VERSION "0") +SET(prj_RELEASE_VERSION "1") +SET( + prj_VERSION + "${prj_MAJOR_VERSION}.${prj_MINOR_VERSION}.${prj_RELEASE_VERSION}" + ) ## =========== ## = Options = @@ -45,19 +48,8 @@ ENDIF(BUILD_SHARED_LIBS) INCLUDE(GenerateExportHeader) -FIND_PACKAGE(VTK REQUIRED) -FIND_PACKAGE(ITK REQUIRED) -INCLUDE(${ITK_USE_FILE}) - -## Check for required modules -IF(NOT ITKVtkGlue_LOADED) - MESSAGE(FATAL_ERROR "ITKVtkGlue module is required but not available.") -ENDIF(NOT ITKVtkGlue_LOADED) - -OPTION(USE_cpPlugins "Build cpPlugins based stuff" OFF) -IF(USE_cpPlugins) - FIND_PACKAGE(cpPlugins REQUIRED) -ENDIF(USE_cpPlugins) +# Find cpPlugins +FIND_PACKAGE(cpPlugins REQUIRED) ## ================================================ ## = Do not allow to build inside the source tree =