Check for CMake policies before they are used to ensure compatibility with CMake 2.8.12. Set CMake 2.8.12 as minimum requirement.

v0.27.3
nkbj 11 years ago
parent 68fb25a2a7
commit b8fd35dda7

@ -17,10 +17,14 @@ if( EXISTS "${CMAKE_SOURCE_DIR}/include/exiv2/exv_conf.h" )
endif()
##
CMAKE_MINIMUM_REQUIRED( VERSION 2.8 )
CMAKE_MINIMUM_REQUIRED( VERSION 2.8.12 )
PROJECT( exiv2 )
if( POLICY CMP0042 )
cmake_policy(SET CMP0042 NEW) # enable MACOSX_RPATH support
else()
SET( CMAKE_MACOSX_RPATH 1 )
endif()
SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")

@ -9,7 +9,9 @@
include(../CMake_msvc.txt)
msvc_runtime_configure(${EXIV2_ENABLE_SHARED})
if( POLICY CMP0026 )
cmake_policy(SET CMP0026 OLD) # Something to do with location
endif()
FOREACH(_currentfile ${XMPSRC})
# http://www.openguru.com/2009/04/cmake-detecting-platformoperating.html

Loading…
Cancel
Save