From c4d51f0835967301be0f13b475aaf33adddc5f54 Mon Sep 17 00:00:00 2001 From: Konstantin Podsvirov Date: Sat, 6 Nov 2021 17:11:09 +0300 Subject: [PATCH] Fix DESTINATION for mosquitto_dynamic_security MODULE On Windows MODULE will be installed as LIBRARY component to `lib` folder that is not prefer for dynamic loaded modules but can be found in RUNTIME DESTINATION (`bin` folder) too. Signed-off-by: Konstantin Podsvirov --- plugins/dynamic-security/CMakeLists.txt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/plugins/dynamic-security/CMakeLists.txt b/plugins/dynamic-security/CMakeLists.txt index 465b99b2..643de1de 100644 --- a/plugins/dynamic-security/CMakeLists.txt +++ b/plugins/dynamic-security/CMakeLists.txt @@ -35,7 +35,12 @@ if (CJSON_FOUND AND WITH_TLS) target_link_libraries(mosquitto_dynamic_security ${CJSON_LIBRARIES} ${OPENSSL_LIBRARIES}) if(WIN32) target_link_libraries(mosquitto_dynamic_security mosquitto) - endif(WIN32) + install(TARGETS mosquitto_dynamic_security + DESTINATION "${CMAKE_INSTALL_BINDIR}") + else() + install(TARGETS mosquitto_dynamic_security + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}") + endif() - install(TARGETS mosquitto_dynamic_security RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}") endif()