From 6c7120a291c2666ab82d78510af47980b0a8b656 Mon Sep 17 00:00:00 2001 From: Vojtech Kral Date: Mon, 25 Mar 2019 11:40:45 +0100 Subject: [PATCH] Build: Fix libz dependency required by libcurl --- src/CMakeLists.txt | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 225a23898..2c3a7eab4 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -92,16 +92,13 @@ endif () # Add the Slic3r GUI library, libcurl, OpenGL and GLU libraries. if (SLIC3R_GUI) + target_link_libraries(slic3r libslic3r_gui ${wxWidgets_LIBRARIES}) - # FIXME: Workaround for missing zlib (still needed by libgio despite wxzlib being present) - find_package(ZLIB REQUIRED) - - target_link_libraries(slic3r libslic3r_gui ${wxWidgets_LIBRARIES} ${ZLIB_LIBRARIES}) - - # Configure libcurl & OpenSSL + # Configure libcurl and its dependencies OpenSSL & zlib find_package(CURL REQUIRED) + find_package(ZLIB REQUIRED) target_include_directories(slic3r PRIVATE ${CURL_INCLUDE_DIRS}) - target_link_libraries(slic3r CURL::libcurl) + target_link_libraries(slic3r ${CURL_LIBRARIES} ${ZLIB_LIBRARIES}) if (SLIC3R_STATIC) if (NOT APPLE) # libcurl is always linked dynamically to the system libcurl on OSX.