VERSION v${LIBMEMCACHED_VERSION})
target_compile_definitions(libmemcached PRIVATE -DBUILDING_LIBMEMCACHED)
target_link_libraries(libmemcached PUBLIC libhashkit Threads::Threads ${LIBSASL_LIBRARIES} ${CMAKE_DL_LIBS} ${Backtrace_LIBRARIES})
-if(PKG_CONFIG_FOUND)
- target_link_libraries(libmemcached PUBLIC libhashkit PkgConfig::LIBSASL)
-else()
- target_link_libraries(libmemcached PUBLIC ${LIBSASL_LIBRARIES})
- target_include_directories(libmemcached PUBLIC ${LIBSASL_INCLUDEDIR})
+if(LIBSASL_FOUND)
+ if(PKG_CONFIG_FOUND)
+ target_link_libraries(libmemcached PUBLIC PkgConfig::LIBSASL)
+ else()
+ target_link_libraries(libmemcached PUBLIC ${LIBSASL_LIBRARIES})
+ target_include_directories(libmemcached PUBLIC ${LIBSASL_INCLUDEDIR})
+ endif()
endif()
target_include_directories(libmemcached PRIVATE ${Backtrace_INCLUDE_DIR})
target_include_directories(libmemcached PRIVATE