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)