mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-18 18:43:01 +08:00
[libpng] Define CMAKE_SYSTEM_PROCESSOR to avoid double-eval failure
This commit is contained in:
parent
d3d5279fb5
commit
bfc687284e
@ -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.
|
||||
|
@ -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
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user