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
This commit is contained in:
DRC
2014-04-16 23:30:38 +00:00
parent 9a341f803f
commit 9fe22dac31

View File

@@ -3,12 +3,15 @@
#
cmake_minimum_required(VERSION 2.8.8)
# 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)