diff options
| author | Robert Schumacher <roschuma@microsoft.com> | 2017-06-19 22:18:05 -0700 |
|---|---|---|
| committer | Robert Schumacher <roschuma@microsoft.com> | 2017-06-19 22:18:19 -0700 |
| commit | bfc687284eea4588aee2b36bffc726573fc4153d (patch) | |
| tree | 652b9c8466160d58452fb02d26c616798a68065f | |
| parent | d3d5279fb58b016cfa1a5695e4af760e59656c62 (diff) | |
| download | vcpkg-bfc687284eea4588aee2b36bffc726573fc4153d.tar.gz vcpkg-bfc687284eea4588aee2b36bffc726573fc4153d.zip | |
[libpng] Define CMAKE_SYSTEM_PROCESSOR to avoid double-eval failure
| -rw-r--r-- | ports/libpng/CONTROL | 2 | ||||
| -rw-r--r-- | ports/libpng/portfile.cmake | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/ports/libpng/CONTROL b/ports/libpng/CONTROL index ec827ebd7..561cc81f8 100644 --- a/ports/libpng/CONTROL +++ b/ports/libpng/CONTROL @@ -1,4 +1,4 @@ Source: libpng -Version: 1.6.29-1 +Version: 1.6.29-2 Build-Depends: zlib Description: libpng is a library implementing an interface for reading and writing PNG (Portable Network Graphics) format files. diff --git a/ports/libpng/portfile.cmake b/ports/libpng/portfile.cmake index be4cb526d..ebcf78aa8 100644 --- a/ports/libpng/portfile.cmake +++ b/ports/libpng/portfile.cmake @@ -23,6 +23,13 @@ else() set(PNG_SHARED_LIBS OFF) endif() +# Libpng's cmake uses if(${CMAKE_SYSTEM_PROCESSOR} ....) which performs double-evaluation and breaks if the variable is not defined. +if(VCPKG_TARGET_ARCHITECTURE STREQUAL x64) + set(CMAKE_SYSTEM_PROCESSOR AMD64) +else() + set(CMAKE_SYSTEM_PROCESSOR ${VCPKG_TARGET_ARCHITECTURE}) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} OPTIONS @@ -32,6 +39,7 @@ vcpkg_configure_cmake( -DSKIP_INSTALL_PROGRAMS=ON -DSKIP_INSTALL_EXECUTABLES=ON -DSKIP_INSTALL_FILES=ON + -DCMAKE_SYSTEM_PROCESSOR=${CMAKE_SYSTEM_PROCESSOR} OPTIONS_DEBUG -DSKIP_INSTALL_HEADERS=ON ) |
