2024-01-13 08:15:51 +00:00
|
|
|
From fd3f3a28e7fce7fe4e10ed2d7edc4bfda8ab27df Mon Sep 17 00:00:00 2001
|
2022-01-13 20:06:32 +00:00
|
|
|
From: Jan Tojnar <jtojnar@gmail.com>
|
2024-01-13 08:15:51 +00:00
|
|
|
Date: Sun, 9 Jan 2022 01:57:18 +0100
|
2022-01-13 20:06:32 +00:00
|
|
|
Subject: [PATCH] build: Make includedir properly overrideable
|
|
|
|
|
|
|
|
This is required by some package managers like Nix.
|
|
|
|
---
|
2023-04-29 16:46:19 +00:00
|
|
|
CMakeLists.txt | 22 +++++++++++++---------
|
|
|
|
1 file changed, 13 insertions(+), 9 deletions(-)
|
2022-01-13 20:06:32 +00:00
|
|
|
|
|
|
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
2024-01-13 08:15:51 +00:00
|
|
|
index ec6d172..6514c23 100644
|
2022-01-13 20:06:32 +00:00
|
|
|
--- a/CMakeLists.txt
|
|
|
|
+++ b/CMakeLists.txt
|
2024-01-13 08:15:51 +00:00
|
|
|
@@ -49,6 +49,10 @@ if(${CMAKE_INSTALL_LIBDIR} STREQUAL "lib64")
|
|
|
|
set(FIND_LIBRARY_USE_LIB64_PATHS true)
|
2022-01-13 20:06:32 +00:00
|
|
|
endif()
|
2024-01-13 08:15:51 +00:00
|
|
|
|
2022-01-13 20:06:32 +00:00
|
|
|
+if(NOT DEFINED CMAKE_INSTALL_INCLUDEDIR)
|
|
|
|
+ set(CMAKE_INSTALL_INCLUDEDIR "include")
|
|
|
|
+endif()
|
|
|
|
+
|
2024-01-13 08:15:51 +00:00
|
|
|
if(NOT CMAKE_CXX_STANDARD)
|
|
|
|
set(CMAKE_CXX_STANDARD 11)
|
2022-01-13 20:06:32 +00:00
|
|
|
endif()
|
2024-01-13 08:15:51 +00:00
|
|
|
@@ -307,7 +311,7 @@ endif()
|
2022-01-13 20:06:32 +00:00
|
|
|
target_include_directories(${PROJECT_NAME} PUBLIC
|
2023-04-29 16:46:19 +00:00
|
|
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
2024-01-13 08:15:51 +00:00
|
|
|
$<BUILD_INTERFACE:${GENERATED_INCLUDE_DIR}>
|
2023-04-29 16:46:19 +00:00
|
|
|
- $<INSTALL_INTERFACE:include>)
|
|
|
|
+ $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
|
2024-01-13 08:15:51 +00:00
|
|
|
|
2022-01-13 20:06:32 +00:00
|
|
|
aws_use_package(aws-c-http)
|
|
|
|
aws_use_package(aws-c-mqtt)
|
2024-01-13 08:15:51 +00:00
|
|
|
@@ -324,14 +328,14 @@ aws_add_sanitizers(${PROJECT_NAME})
|
|
|
|
|
|
|
|
target_link_libraries(${PROJECT_NAME} PUBLIC ${DEP_AWS_LIBS})
|
|
|
|
|
2022-01-13 20:06:32 +00:00
|
|
|
-install(FILES ${AWS_CRT_HEADERS} DESTINATION "include/aws/crt" COMPONENT Development)
|
|
|
|
-install(FILES ${AWS_CRT_AUTH_HEADERS} DESTINATION "include/aws/crt/auth" COMPONENT Development)
|
|
|
|
-install(FILES ${AWS_CRT_CRYPTO_HEADERS} DESTINATION "include/aws/crt/crypto" COMPONENT Development)
|
|
|
|
-install(FILES ${AWS_CRT_IO_HEADERS} DESTINATION "include/aws/crt/io" COMPONENT Development)
|
|
|
|
-install(FILES ${AWS_CRT_IOT_HEADERS} DESTINATION "include/aws/iot" COMPONENT Development)
|
|
|
|
-install(FILES ${AWS_CRT_MQTT_HEADERS} DESTINATION "include/aws/crt/mqtt" COMPONENT Development)
|
|
|
|
-install(FILES ${AWS_CRT_HTTP_HEADERS} DESTINATION "include/aws/crt/http" COMPONENT Development)
|
2023-04-29 16:46:19 +00:00
|
|
|
-install(FILES ${AWS_CRT_ENDPOINT_HEADERS} DESTINATION "include/aws/crt/endpoints" COMPONENT Development)
|
2022-01-13 20:06:32 +00:00
|
|
|
+install(FILES ${AWS_CRT_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/aws/crt" COMPONENT Development)
|
|
|
|
+install(FILES ${AWS_CRT_AUTH_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/aws/crt/auth" COMPONENT Development)
|
|
|
|
+install(FILES ${AWS_CRT_CRYPTO_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/aws/crt/crypto" COMPONENT Development)
|
|
|
|
+install(FILES ${AWS_CRT_IO_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/aws/crt/io" COMPONENT Development)
|
|
|
|
+install(FILES ${AWS_CRT_IOT_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/aws/iot" COMPONENT Development)
|
|
|
|
+install(FILES ${AWS_CRT_MQTT_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/aws/crt/mqtt" COMPONENT Development)
|
|
|
|
+install(FILES ${AWS_CRT_HTTP_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/aws/crt/http" COMPONENT Development)
|
2023-04-29 16:46:19 +00:00
|
|
|
+install(FILES ${AWS_CRT_ENDPOINT_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/aws/crt/endpoints" COMPONENT Development)
|
2024-01-13 08:15:51 +00:00
|
|
|
|
2023-04-29 16:46:19 +00:00
|
|
|
install(
|
|
|
|
TARGETS ${PROJECT_NAME}
|
2024-01-13 08:15:51 +00:00
|
|
|
--
|
|
|
|
2.42.0
|