Allow i386 or x86_64 only builds

This commit is contained in:
Andrew Hyatt 2019-08-13 14:25:28 -04:00
parent 07cf1da0b8
commit 6980a7b5db
No known key found for this signature in database
GPG Key ID: 5456D0F696719C24
2 changed files with 13 additions and 4 deletions

View File

@ -33,10 +33,19 @@ set(zlib_sources
zutil.c
)
add_library(z64 OBJECT contrib/amd64/amd64-match.S)
set_target_properties(z64 PROPERTIES COMPILE_FLAGS "-arch x86_64")
add_library(z32 OBJECT contrib/asm686/match.S)
set_target_properties(z32 PROPERTIES COMPILE_FLAGS "-arch i386")
if (TARGET_x86_64)
add_darling_object_library(z64 contrib/amd64/amd64-match.S)
set_target_properties(z64 PROPERTIES COMPILE_FLAGS "-arch x86_64")
else (TARGET_x86_64)
add_darling_object_library(z64 empty.c)
endif (TARGET_x86_64)
if (TARGET_i386)
add_darling_object_library(z32 contrib/asm686/match.S)
set_target_properties(z32 PROPERTIES COMPILE_FLAGS "-arch i386")
else (TARGET_i386)
add_darling_object_library(z32 empty.c)
endif (TARGET_i386)
set(DYLIB_INSTALL_NAME "/usr/lib/libz.1.dylib")
set(DYLIB_COMPAT_VERSION "1.0.0")

0
empty.c Normal file
View File