--- CMakeLists.txt.orig	2020-02-28 16:02:25 UTC
+++ CMakeLists.txt
@@ -16,6 +16,8 @@ set(CMAKE_AUTOUIC ON)
 set(CMAKE_AUTORCC ON)
 
 find_package(Qt5 COMPONENTS LinguistTools Multimedia Network WebEngine WebEngineWidgets Widgets REQUIRED)
+find_library(EB_LIBRARY eb)
+find_library(Z_LIBRARY z)
 
 add_executable(qolibri MACOSX_BUNDLE WIN32
     images/qolibri.icns
@@ -154,6 +156,6 @@ set_source_files_properties(${TS_FILES} PROPERTIES OUT
 qt5_add_translation(QM_FILES ${TS_FILES})
 target_sources(qolibri PRIVATE "${CMAKE_CURRENT_BINARY_DIR}/translations/translations.qrc" ${QM_FILES} ${TS_FILES})
 
-target_link_libraries(qolibri Qt5::Multimedia Qt5::Network Qt5::WebEngine Qt5::WebEngineWidgets Qt5::Widgets eb z)
+target_link_libraries(qolibri Qt5::Multimedia Qt5::Network Qt5::WebEngine Qt5::WebEngineWidgets Qt5::Widgets ${EB_LIBRARY} ${Z_LIBRARY})
 
 install(TARGETS qolibri DESTINATION "${CMAKE_INSTALL_BINDIR}")
