diff --git a/CMakeLists.txt b/CMakeLists.txt index 2c671de8..b27d2072 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -132,7 +132,9 @@ if(WANT_CYRUS) CYRUS_HARDCODED) set(CMAKE_REQUIRED_LIBRARIES "${_old_cmake_required_libraries}") if(CYRUS_HARDCODED) - set(CYRUS_LDFLAGS -lsasl2) + add_library(HardcodedCyrusDep INTERFACE) + add_library(PkgConfig::CYRUS ALIAS HardcodedCyrusDep) + target_link_libraries(HardcodedCyrusDep INTERFACE sasl2) set(CYRUS_FOUND true) endif() endif()