Commit bcbee4c1 authored by jan.koester's avatar jan.koester
Browse files

client: export the include directory relative to the install prefix

An absolute ${CMAKE_INSTALL_PREFIX}/include/fenrirds broke every consumer
of a relocated install (cross sysroot, scratch prefix): "Imported target
fenrirds::client includes non-existent path".

Co-Authored-By: default avatarClaude Opus 5.5 <noreply@anthropic.com>
parent 834383f3
Loading
Loading
Loading
Loading
Loading
+5 −2
Changes for client/CMakeLists.txt: 5 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -18,8 +18,11 @@ set_target_properties(client PROPERTIES

target_link_libraries(client PUBLIC uuidp::uuidp confplus::confplus netplus::netplus json-c::json-c httppp::httppp paritypp::paritypp )

set_target_properties(client PROPERTIES
  INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/include/fenrirds"
# relative to the install prefix: an absolute ${CMAKE_INSTALL_PREFIX}/include/fenrirds broke
# every consumer of a relocated install (cross sysroot, scratch prefix)
target_include_directories(client INTERFACE
  $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
  $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/fenrirds>
)

write_basic_package_version_file(