diff --git a/.ci/docker/ubuntu.Dockerfile b/.ci/docker/ubuntu.Dockerfile index 8741084..7f4e8db 100644 --- a/.ci/docker/ubuntu.Dockerfile +++ b/.ci/docker/ubuntu.Dockerfile @@ -1,6 +1,6 @@ # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -# Using a non-LTS Ubuntu, just until CMake 3.23 is available on Ubuntu 24.04. +# Using a non-LTS Ubuntu, just until CMake 3.24 is available on Ubuntu 24.04. FROM ubuntu:23.10 # Install dependencies, @@ -30,5 +30,6 @@ ENV CC="$cc" CXX="$cxx" CMAKE_GENERATOR="Ninja" CMAKE_EXPORT_COMPILE_COMMANDS=on RUN ls -lR src RUN cmake -B build -S . "$cmake_args" RUN cmake --build build --verbose +RUN cmake --build build --target all_verify_interface_header_sets RUN cmake --install build --prefix /opt/beman.exemplar RUN find /opt/beman.exemplar -type f diff --git a/src/beman/exemplar/CMakeLists.txt b/src/beman/exemplar/CMakeLists.txt index cb73ee3..e4b624c 100644 --- a/src/beman/exemplar/CMakeLists.txt +++ b/src/beman/exemplar/CMakeLists.txt @@ -5,20 +5,21 @@ add_library(beman::exemplar ALIAS beman.exemplar) target_sources(beman.exemplar PRIVATE identity.cpp) -target_include_directories( - beman.exemplar - PUBLIC $) +set(INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../../include/) + +target_sources( + beman.exemplar PUBLIC + FILE_SET HEADERS + BASE_DIRS ${INCLUDE_DIR} + FILES ${INCLUDE_DIR}/beman/exemplar/identity.hpp) + +set_target_properties(beman.exemplar PROPERTIES VERIFY_INTERFACE_HEADER_SETS ON) install( TARGETS beman.exemplar EXPORT beman.exemplar - DESTINATION ${CMAKE_INSTALL_LIBDIR}) - -install( - DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../../../include/ - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} - FILES_MATCHING - PATTERN "*.hpp") + FILE_SET HEADERS + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) if(BUILD_TESTING) include(GoogleTest)