From 9fe22dac3166447c805be2722efeaa2ebaf1eb8c Mon Sep 17 00:00:00 2001 From: DRC Date: Wed, 16 Apr 2014 23:30:38 +0000 Subject: [PATCH] Set the BUILD environment variable properly when building with MinGW implementations that lack a Unix shell (TDM-GCC, for instance); Only set CMP0022 if it is supported (older CMake implementations don't support it); Remove trailing spaces git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1238 632fc199-4ca6-4c93-a231-07263d6284db --- CMakeLists.txt | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d3c0972..287ada1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,12 +3,15 @@ # cmake_minimum_required(VERSION 2.8.8) -cmake_policy(SET CMP0022 OLD) +# Use LINK_INTERFACE_LIBRARIES instead of INTERFACE_LINK_LIBRARIES +if(POLICY CMP0022) + cmake_policy(SET CMP0022 OLD) +endif() project(libjpeg-turbo C) set(VERSION 1.3.1) -if(MINGW OR CYGWIN) +if(CYGWIN OR NOT CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows") execute_process(COMMAND "date" "+%Y%m%d" OUTPUT_VARIABLE BUILD) string(REGEX REPLACE "\n" "" BUILD ${BUILD}) elseif(WIN32) @@ -469,7 +472,7 @@ else() set(INST_DEFS ${INST_DEFS} "-DBUILDDIR=") endif() -STRING(REGEX REPLACE "/" "\\\\" INST_DIR ${CMAKE_INSTALL_PREFIX}) +STRING(REGEX REPLACE "/" "\\\\" INST_DIR ${CMAKE_INSTALL_PREFIX}) configure_file(release/libjpeg-turbo.nsi.in libjpeg-turbo.nsi @ONLY) @@ -489,7 +492,7 @@ install(TARGETS jpeg-static turbojpeg turbojpeg-static rdjpgcom wrjpgcom tjbench ) install(FILES ${CMAKE_SOURCE_DIR}/README ${CMAKE_SOURCE_DIR}/README-turbo.txt - ${CMAKE_SOURCE_DIR}/example.c ${CMAKE_SOURCE_DIR}/libjpeg.txt + ${CMAKE_SOURCE_DIR}/example.c ${CMAKE_SOURCE_DIR}/libjpeg.txt ${CMAKE_SOURCE_DIR}/structure.txt ${CMAKE_SOURCE_DIR}/usage.txt ${CMAKE_SOURCE_DIR}/wizard.txt DESTINATION doc) -- 2.40.0