From 436635fda8c8f20963d97ea688002a5e5c836418 Mon Sep 17 00:00:00 2001 From: "Roger A. Light" Date: Wed, 22 Jun 2022 22:43:39 +0100 Subject: [PATCH] Use absolute rather than relative paths when installing. --- lib/CMakeLists.txt | 4 ++-- lib/cpp/CMakeLists.txt | 2 +- src/CMakeLists.txt | 9 +++++++-- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 606a18a0..fb0362aa 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -171,5 +171,5 @@ if(WITH_STATIC_LIBRARIES) ) endif() -install(FILES ../include/mosquitto.h DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}") -install(FILES ../include/mqtt_protocol.h DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}") +install(FILES ${mosquitto_SOURCE_DIR}/include/mosquitto.h DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}") +install(FILES ${mosquitto_SOURCE_DIR}/include/mqtt_protocol.h DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}") diff --git a/lib/cpp/CMakeLists.txt b/lib/cpp/CMakeLists.txt index 99a2eb28..d249cc57 100644 --- a/lib/cpp/CMakeLists.txt +++ b/lib/cpp/CMakeLists.txt @@ -69,4 +69,4 @@ if(WITH_STATIC_LIBRARIES) ) endif() -install(FILES ../../mosquittopp.h DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}") +install(FILES ${mosquitto_SOURCE_DIR}/include/mosquittopp.h DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}") diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 250bcfd5..f7f9af12 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -186,7 +186,7 @@ endif() if(WITH_WEBSOCKETS) if(WITH_WEBSOCKETS_BUILTIN) add_definitions("-DWITH_WEBSOCKETS=WS_IS_BUILTIN") - set(MOSQ_SRCS ${MOSQ_SRCS} ../deps/picohttpparser/picohttpparser.c) + set(MOSQ_SRCS ${MOSQ_SRCS} ${mosquitto_SOURCE_DIR}/deps/picohttpparser/picohttpparser.c) else() find_package(libwebsockets) add_definitions("-DWITH_WEBSOCKETS=WS_IS_LWS") @@ -271,4 +271,9 @@ endif() install(TARGETS mosquitto RUNTIME DESTINATION "${CMAKE_INSTALL_SBINDIR}" ) -install(FILES ../include/mosquitto_broker.h ../include/mosquitto_plugin.h DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}") +install( + FILES + ${mosquitto_SOURCE_DIR}/include/mosquitto_broker.h + ${mosquitto_SOURCE_DIR}/include/mosquitto_plugin.h + DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" +)