diff --git a/modules/scratch/CMakeLists.txt b/modules/scratch/CMakeLists.txt index 012ffdc613..defd37a625 100644 --- a/modules/scratch/CMakeLists.txt +++ b/modules/scratch/CMakeLists.txt @@ -1,14 +1,19 @@ # Are we running cmake from this directory (out of tree build) ? if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) - cmake_minimum_required(VERSION 2.8.3) + cmake_minimum_required(VERSION 2.8.12...3.6.0) + project(imp_module) if(POLICY CMP0058) cmake_policy(SET CMP0058 NEW) endif(POLICY CMP0058) + if(POLICY CMP0053) + cmake_policy(SET CMP0053 NEW) + endif(POLICY CMP0053) + set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/cmake_modules) - set(SWIG_EXECUTABLE swig CACHE STRING "Swig program") + set(SWIG_EXECUTABLE swig CACHE STRING "SWIG program") find_package(IMP REQUIRED) include(${IMP_USE_FILE}) @@ -23,7 +28,7 @@ if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) include_directories(SYSTEM ${IMP_INCLUDE_DIR}) include_directories("${CMAKE_BINARY_DIR}/include") - imp_build_module(${CMAKE_SOURCE_DIR}) + imp_build_module(${CMAKE_SOURCE_DIR} scratch) else() include(ModuleBuild.cmake)