game: only use glibc wrappers on linux

This commit is contained in:
Crypto City 2021-03-25 13:53:45 +00:00
parent 6261344b9a
commit 55462a21cd

View File

@ -138,8 +138,7 @@ set(game_sources
ui-tb-message-box.cc
ui-tb-window.cc
ui-travel-to-city.cc
walker-camera.cc
glibc-wrappers.c)
walker-camera.cc)
set(game_headers
UTBRendererBatcher.h
@ -226,6 +225,10 @@ set(game_headers
ui-travel-to-city.h
walker-camera.h)
if (UNIX AND NOT APPLE)
set(game_sources ${game_sources} glibc-wrappers.c)
endif()
monero_private_headers(game
${game_private_headers})
@ -284,8 +287,10 @@ set_property(TARGET game
OUTPUT_NAME "townforge")
install(TARGETS game DESTINATION bin)
if (UNIX AND NOT APPLE)
set_property (SOURCE glibc-wrappers.c PROPERTY COMPILE_FLAGS "-std=gnu99")
set_property (TARGET game APPEND PROPERTY LINK_FLAGS "-Wl,--wrap=pow -Wl,--wrap=log")
endif()
if (APPLE)
set_property (TARGET game APPEND PROPERTY LINK_FLAGS "-framework OpenGL -framework CoreAudio -framework AudioToolbox -framework CoreFoundation -framework CoreGraphics -framework CoreVideo -framework ForceFeedback -framework IOKit -framework Carbon -framework AppKit -framework SystemConfiguration")