From c992177edabd604160458e255b07d7b23f3f1a85 Mon Sep 17 00:00:00 2001 From: "Anthony J. Bentley" Date: Mon, 9 Oct 2017 03:42:35 -0600 Subject: Only link against libdl on Linux. --- CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2076d30..d824f6f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -82,8 +82,10 @@ if (UNIX) LINK_LIBRARIES(${GTK3_LIBRARIES}) ADD_DEFINITIONS(${GTK3_CFLAGS_OTHER}) - - LINK_LIBRARIES("dl") + + if (CMAKE_SYSTEM_NAME STREQUAL "Linux") + LINK_LIBRARIES("dl") + endif () endif (UNIX) find_package(SDL2 REQUIRED) -- cgit v1.2.3