From 74c08aa486493d62ffece0906555878276ae2c32 Mon Sep 17 00:00:00 2001 From: Henrique Gemignani Passos Lima Date: Tue, 15 Mar 2022 01:48:08 +0200 Subject: [PATCH] Properly depend on zlib --- CMakeLists.txt | 6 ++---- Runtime/CMakeLists.txt | 1 + imgui/CMakeLists.txt | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 473c03a4c..a7bf46d06 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -332,10 +332,8 @@ if(USE_LD_GOLD) endif() endif() -if (NOT WIN32) - find_package(ZLIB REQUIRED) - set(ZLIB_LIBRARIES ZLIB::ZLIB CACHE STRING "zlib libraries" FORCE) -endif() +find_package(ZLIB REQUIRED) +set(ZLIB_LIBRARIES ZLIB::ZLIB CACHE STRING "zlib libraries" FORCE) include(ExternalProject) ExternalProject_Add(bintoc diff --git a/Runtime/CMakeLists.txt b/Runtime/CMakeLists.txt index dcc22e0e5..ed9e83ecc 100644 --- a/Runtime/CMakeLists.txt +++ b/Runtime/CMakeLists.txt @@ -149,6 +149,7 @@ endfunction() set(RUNTIME_INCLUDES ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}) set(RUNTIME_LIBRARIES amuse zeus nod NESEmulator libjpeg-turbo jbus kabufuda discord-rpc logvisor OptickCore imgui aurora SDL2-static boo # TODO move audiodev + ${ZLIB_LIBRARIES} ) add_runtime_common_library(RuntimeCommon ${RUNTIME_SOURCES_A}) diff --git a/imgui/CMakeLists.txt b/imgui/CMakeLists.txt index 90d1fdd90..a229ab3b4 100644 --- a/imgui/CMakeLists.txt +++ b/imgui/CMakeLists.txt @@ -17,7 +17,7 @@ if (CMAKE_COMPILER_IS_GNUCXX) # currently explicitly ignored for clang in imgui code, but not gcc (yet) target_compile_options(imgui PRIVATE -Wno-deprecated-enum-enum-conversion) endif() -target_link_libraries(imgui PRIVATE aurora zeus logvisor) +target_link_libraries(imgui PRIVATE aurora zeus logvisor ${ZLIB_LIBRARIES}) # Optional, replaces stb_freetype if available find_package(Freetype)