From 50fd07efdce634deb777bdc11fcbc2c0013fbff7 Mon Sep 17 00:00:00 2001 From: CharlesThobe Date: Thu, 6 Jan 2022 06:41:00 +0200 Subject: [PATCH] platform specific linking from genie.lua --- CMakeLists.txt | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 78aea8e..c6e4251 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -52,5 +52,21 @@ target_compile_definitions(chdman PRIVATE BARE_VCS_REVISION="${vcs_revision}" ) -target_link_libraries(chdman PRIVATE utils expat 7z ocore_sdl zlib flac utf8proc -dl m pthread util) +target_link_libraries(chdman PRIVATE utils expat 7z ocore_sdl zlib flac utf8proc) + +if(UNIX) +target_link_libraries(chdman PRIVATE pthread util) +elseif(WIN32) +target_link_libraries(chdman PRIVATE + user32 + winmm + advapi32 + shlwapi + wsock32 + ws2_32 + psapi + iphlpapi + shell32 + userenv +) +endif()