This is an automated email from the ASF dual-hosted git repository.
mgrigorov pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/avro.git
The following commit(s) were added to refs/heads/main by this push:
new 967da782b9 AVRO-4167: [C++] Fix install locations (#3434)
967da782b9 is described below
commit 967da782b909eccf8e2cc65a47edcb0cab396486
Author: Aaron Barany <[email protected]>
AuthorDate: Tue Jul 22 13:14:03 2025 -0700
AVRO-4167: [C++] Fix install locations (#3434)
Use standard CMake variables for the locations, which can vary depending
on platform. (e.g. lib64 instead of lib) Use bin rather than lib
directory for runtime, which is expected for Windows DLLs.
---
lang/c++/CMakeLists.txt | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/lang/c++/CMakeLists.txt b/lang/c++/CMakeLists.txt
index d4586558a3..289daf9137 100644
--- a/lang/c++/CMakeLists.txt
+++ b/lang/c++/CMakeLists.txt
@@ -141,7 +141,7 @@ target_compile_definitions(avrocpp_s PRIVATE AVRO_SOURCE)
set_target_properties (avrocpp PROPERTIES VERSION ${AVRO_VERSION})
set_target_properties (avrocpp_s PROPERTIES VERSION ${AVRO_VERSION})
-target_link_libraries(avrocpp PUBLIC
+target_link_libraries(avrocpp PUBLIC
$<BUILD_INTERFACE:fmt::fmt-header-only>
$<BUILD_INTERFACE:ZLIB::ZLIB>
$<BUILD_INTERFACE:$<TARGET_NAME_IF_EXISTS:Snappy::snappy>>
@@ -258,13 +258,13 @@ include (CPack)
install (TARGETS avrocpp avrocpp_s
EXPORT avrocpp_targets
- LIBRARY DESTINATION lib
- ARCHIVE DESTINATION lib
- RUNTIME DESTINATION lib
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
INCLUDES DESTINATION include)
if (AVRO_BUILD_EXECUTABLES)
- install (TARGETS avrogencpp EXPORT avrocpp_targets RUNTIME DESTINATION bin)
+ install (TARGETS avrogencpp EXPORT avrocpp_targets RUNTIME DESTINATION
${CMAKE_INSTALL_BINDIR})
endif ()
install (DIRECTORY include/avro DESTINATION include