This is an automated email from the ASF dual-hosted git repository.
isapego pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/ignite-3.git
The following commit(s) were added to refs/heads/main by this push:
new f107a54ab8 IGNITE-18802 CMake: option for the install target added.
(#1670)
f107a54ab8 is described below
commit f107a54ab872acccc9b963e16cc4a63339402943
Author: Dmitriy Zabotlin <[email protected]>
AuthorDate: Mon Feb 20 18:44:17 2023 +0200
IGNITE-18802 CMake: option for the install target added. (#1670)
Co-authored-by: dzabotlin <[email protected]>
---
modules/platforms/cpp/CMakeLists.txt | 1 +
modules/platforms/cpp/ignite/client/CMakeLists.txt | 14 +++++++++-----
modules/platforms/cpp/ignite/common/CMakeLists.txt | 4 +++-
modules/platforms/cpp/ignite/schema/CMakeLists.txt | 14 +++++++++-----
4 files changed, 22 insertions(+), 11 deletions(-)
diff --git a/modules/platforms/cpp/CMakeLists.txt
b/modules/platforms/cpp/CMakeLists.txt
index 2b3fbf359d..77672381cb 100644
--- a/modules/platforms/cpp/CMakeLists.txt
+++ b/modules/platforms/cpp/CMakeLists.txt
@@ -50,6 +50,7 @@ option(ENABLE_UB_SANITIZER "If undefined behavior sanitizer
is enabled" OFF)
option(ENABLE_CLIENT "Build Ignite.C++ Client module" ON)
option(ENABLE_TESTS "Build Ignite.C++ tests" OFF)
option(WARNINGS_AS_ERRORS "Treat warning as errors" OFF)
+option(INSTALL_IGNITE_FILES "Install Ignite files" ON)
# Turn on DLL export directives.
add_definitions(-DIGNITE_IMPL)
diff --git a/modules/platforms/cpp/ignite/client/CMakeLists.txt
b/modules/platforms/cpp/ignite/client/CMakeLists.txt
index 8233e4c4a5..54a290617c 100644
--- a/modules/platforms/cpp/ignite/client/CMakeLists.txt
+++ b/modules/platforms/cpp/ignite/client/CMakeLists.txt
@@ -59,11 +59,15 @@ endif()
target_link_libraries(${TARGET} ignite-common ignite-schema ignite-network
ignite-protocol)
-install(TARGETS ${TARGET}
- RUNTIME DESTINATION bin
- ARCHIVE DESTINATION lib
- LIBRARY DESTINATION lib
-)
+if (${INSTALL_IGNITE_FILES})
+ install(TARGETS ${TARGET}
+ RUNTIME DESTINATION bin
+ ARCHIVE DESTINATION lib
+ LIBRARY DESTINATION lib
+ )
+
+ ignite_install_headers(FILES ${PUBLIC_HEADERS} DESTINATION
${IGNITE_INCLUDEDIR}/client)
+endif()
ignite_install_headers(FILES ${PUBLIC_HEADERS} DESTINATION
${IGNITE_INCLUDEDIR}/client)
diff --git a/modules/platforms/cpp/ignite/common/CMakeLists.txt
b/modules/platforms/cpp/ignite/common/CMakeLists.txt
index b736332962..0f2af03db0 100644
--- a/modules/platforms/cpp/ignite/common/CMakeLists.txt
+++ b/modules/platforms/cpp/ignite/common/CMakeLists.txt
@@ -47,7 +47,9 @@ target_include_directories(${TARGET} INTERFACE
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}>
$<INSTALL_INTERFACE:${IGNITE_INCLUDEDIR}>)
-ignite_install_headers(FILES ${PUBLIC_HEADERS} DESTINATION
${IGNITE_INCLUDEDIR}/common)
+if (${INSTALL_IGNITE_FILES})
+ ignite_install_headers(FILES ${PUBLIC_HEADERS} DESTINATION
${IGNITE_INCLUDEDIR}/common)
+endif()
ignite_test(bits_test bits_test.cpp LIBS ${TARGET})
ignite_test(bytes_test bytes_test.cpp LIBS ${TARGET})
diff --git a/modules/platforms/cpp/ignite/schema/CMakeLists.txt
b/modules/platforms/cpp/ignite/schema/CMakeLists.txt
index a23b318c6f..598f3e43ab 100644
--- a/modules/platforms/cpp/ignite/schema/CMakeLists.txt
+++ b/modules/platforms/cpp/ignite/schema/CMakeLists.txt
@@ -41,10 +41,14 @@ target_link_libraries(${TARGET} ignite-common)
ignite_test(tuple_test tuple_test.cpp LIBS ${TARGET})
-install(TARGETS ${TARGET}
- RUNTIME DESTINATION bin/
- ARCHIVE DESTINATION lib
- LIBRARY DESTINATION lib
-)
+if (${INSTALL_IGNITE_FILES})
+ install(TARGETS ${TARGET}
+ RUNTIME DESTINATION bin/
+ ARCHIVE DESTINATION lib
+ LIBRARY DESTINATION lib
+ )
+
+ ignite_install_headers(FILES ${PUBLIC_HEADERS} DESTINATION
${IGNITE_INCLUDEDIR}/schema)
+endif()
ignite_install_headers(FILES ${PUBLIC_HEADERS} DESTINATION
${IGNITE_INCLUDEDIR}/schema)