cmake: Fix a build error on iOS

Avoid the awk-based configuration when cross-compiling from macOS
to iOS.
This commit is contained in:
Steve Robinson 2019-08-24 13:25:14 -07:00 committed by Cosmin Truta
parent 6dd99ca9c8
commit 5e8b45c436

View File

@ -14,6 +14,7 @@
# Revised by Cosmin Truta, 2018
# Revised by Kyle Bentley, 2018
# Revised by David Callu, 2020
# Revised by Steve Robinson, 2020
# This code is released under the libpng license.
# For conditions of distribution and use, see the disclaimer
@ -273,7 +274,7 @@ find_program(AWK NAMES gawk awk)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
if(NOT AWK OR ANDROID)
if(NOT AWK OR ANDROID OR IOS)
# No awk available to generate sources; use pre-built pnglibconf.h
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/scripts/pnglibconf.h.prebuilt
${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.h)
@ -452,7 +453,7 @@ else()
"${CMAKE_CURRENT_BINARY_DIR}/scripts/symbols.chk"
"${CMAKE_CURRENT_BINARY_DIR}/scripts/symbols.out"
"${CMAKE_CURRENT_BINARY_DIR}/scripts/vers.out")
endif(NOT AWK OR ANDROID)
endif(NOT AWK OR ANDROID OR IOS)
# OUR SOURCES
set(libpng_public_hdrs
@ -466,7 +467,7 @@ set(libpng_private_hdrs
pnginfo.h
pngstruct.h
)
if(AWK AND NOT ANDROID)
if(AWK AND NOT ANDROID AND NOT IOS)
list(APPEND libpng_private_hdrs "${CMAKE_CURRENT_BINARY_DIR}/pngprefix.h")
endif()
set(libpng_sources