From a1577bf965564d1f5752456b2d85a49f9e31e659 Mon Sep 17 00:00:00 2001 From: Glenn Randers-Pehrson Date: Thu, 18 May 2017 18:15:50 -0500 Subject: [PATCH] [libpng16] Test CMAKE_HOST_WIN32 instead of WIN32 in CMakeLists.txt --- ANNOUNCE | 5 +++-- CHANGES | 3 ++- CMakeLists.txt | 4 ++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/ANNOUNCE b/ANNOUNCE index 4e63ed95a..d0aeb434c 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -1,4 +1,4 @@ -Libpng 1.6.30beta03 - May 16, 2017 +Libpng 1.6.30beta03 - May 18, 2017 This is not intended to be a public release. It will be replaced within a few weeks by a public version or by another test version. @@ -38,9 +38,10 @@ Version 1.6.30beta02 [April 22, 2017] example.c, and in the manual (suggested by Jaeseung Choi). Removed reference to the obsolete PNG_SAFE_LIMITS macro in the documentation. -Version 1.6.30beta03 [May 16, 2017] +Version 1.6.30beta03 [May 18, 2017] Check for integer overflow in contrib/visupng and contrib/tools/genpng. Do not double evaluate CMAKE_SYSTEM_PROCESSOR in CMakeLists.txt + Test CMAKE_HOST_WIN32 instead of WIN32 in CMakeLists.txt Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/CHANGES b/CHANGES index 382161bc1..458be5c7d 100644 --- a/CHANGES +++ b/CHANGES @@ -5833,9 +5833,10 @@ Version 1.6.30beta02 [April 22, 2017] example.c, and in the manual (suggested by Jaeseung Choi). Removed reference to the obsolete PNG_SAFE_LIMITS macro in the documentation. -Version 1.6.30beta03 [May 16, 2017] +Version 1.6.30beta03 [May 18, 2017] Check for integer overflow in contrib/visupng and contrib/tools/genpng. Do not double evaluate CMAKE_SYSTEM_PROCESSOR in CMakeLists.txt + Test CMAKE_HOST_WIN32 instead of WIN32 in CMakeLists.txt Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/CMakeLists.txt b/CMakeLists.txt index 191e85404..727d1f3b6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -718,7 +718,7 @@ ENDIF(NOT CMAKE_LIBRARY_OUTPUT_DIRECTORY) # copies if different. macro(CREATE_SYMLINK SRC_FILE DEST_FILE) FILE(REMOVE ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${DEST_FILE}) - if(WIN32 AND NOT CYGWIN AND NOT MSYS) + if(CMAKE_HOST_WIN32 AND NOT CYGWIN AND NOT MSYS) ADD_CUSTOM_COMMAND( OUTPUT ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${DEST_FILE} ${CMAKE_CURRENT_BINARY_DIR}/${DEST_FILE} COMMAND ${CMAKE_COMMAND} -E copy_if_different "${SRC_FILE}" ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${DEST_FILE} @@ -846,7 +846,7 @@ if(NOT SKIP_INSTALL_FILES AND NOT SKIP_INSTALL_ALL ) install(FILES libpng.3 libpngpf.3 DESTINATION ${PNG_MAN_DIR}/man3) install(FILES png.5 DESTINATION ${PNG_MAN_DIR}/man5) # Install pkg-config files - if(NOT WIN32 OR CYGWIN OR MINGW) + if(NOT CMAKE_HOST_WIN32 OR CYGWIN OR MINGW) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libpng.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/libpng-config