From e54338ef01902bc68bbd704276d7dc2a6dbb01e0 Mon Sep 17 00:00:00 2001 From: Ronald Kinard Date: Wed, 28 Jan 2015 23:20:21 -0600 Subject: [PATCH] cmake: fix Windows linking --- src/sdl/CMakeLists.txt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/sdl/CMakeLists.txt b/src/sdl/CMakeLists.txt index 446f7fdc..1228fd2c 100644 --- a/src/sdl/CMakeLists.txt +++ b/src/sdl/CMakeLists.txt @@ -113,10 +113,15 @@ if(${SDL2_FOUND}) ${PNG_LIBRARIES} ${ZLIB_LIBRARIES} ${OPENGL_LIBRARIES} - m #need math lol - rt # this too ) + if(${CMAKE_SYSTEM} MATCHES Linux) + target_link_libraries(${SRB2_SDL2_EXE_NAME} PRIVATE + m + rt + ) + endif() + endif() set_target_properties(${SRB2_SDL2_EXE_NAME} PROPERTIES VERSION ${SRB2_VERSION})