From 5294360908c462ea24a613230df18dc336f55d75 Mon Sep 17 00:00:00 2001 From: Myk Taylor Date: Sun, 9 Aug 2020 09:46:54 -0700 Subject: [PATCH] more windows library naming shenanigans --- plugins/CMakeLists.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt index 6531165e1..2bc135d33 100644 --- a/plugins/CMakeLists.txt +++ b/plugins/CMakeLists.txt @@ -85,6 +85,12 @@ set_target_properties(zip PROPERTIES IMPORTED_LOCATION ${LIBZIP_LIB}) add_library(expat STATIC IMPORTED) set_target_properties(expat PROPERTIES IMPORTED_LOCATION ${LIBEXPAT_LIB}) +if(WIN32) + set(LIB_Z_LIB "zlib.lib") +else() + set(LIB_Z_LIB "z") +endif() + # Plugins option(BUILD_SUPPORTED "Build the supported plugins (reveal, probe, etc.)." ON) if(BUILD_SUPPORTED) @@ -183,7 +189,7 @@ if(BUILD_SUPPORTED) add_subdirectory(tweak) dfhack_plugin(workflow workflow.cpp LINK_LIBRARIES lua) dfhack_plugin(workNow workNow.cpp) - dfhack_plugin(xlsxreader xlsxreader.cpp LINK_LIBRARIES lua xlsxio_read zip expat z) + dfhack_plugin(xlsxreader xlsxreader.cpp LINK_LIBRARIES lua xlsxio_read zip expat ${LIB_Z_LIB}) dfhack_plugin(zone zone.cpp LINK_LIBRARIES lua) endif() target_include_directories(xlsxreader PRIVATE ${XLSXIO_INSTALL_DIR}/include)