From d174adbe1068bfa43d0fe5fd42c0bce34fa4b504 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Fri, 3 Jan 2025 13:14:13 -0500 Subject: [PATCH 1/2] [c]: install headers under cucumber/gherkin/ Rather than installing all the C headers directly under e.g. `/usr/include`, put them in a subdirectory like `/usr/include/cucumber/gherkin`. This is *not* the same directory as the C++ headers, which have an extra `cucumber/` corresponding to the `cucumber::` C++ namespace, e.g. `/usr/include/cucumber/cucumber/gherkin/`. See https://github.com/cucumber/messages/issues/267#issuecomment-2478224301. --- c/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/c/CMakeLists.txt b/c/CMakeLists.txt index b3ad67d2c..9806b5742 100644 --- a/c/CMakeLists.txt +++ b/c/CMakeLists.txt @@ -154,7 +154,7 @@ install( install( DIRECTORY "${PROJECT_SOURCE_DIR}/include/" - DESTINATION ${include_install_dir} + DESTINATION ${include_install_dir}/cucumber/gherkin FILES_MATCHING PATTERN "*.*h") install( From 5649f323a64ef149901ca2ed74d7119562124957 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Fri, 3 Jan 2025 17:48:44 -0500 Subject: [PATCH 2/2] [c]: install cmake configs under gherkin/ Rather than installing `.cmake` files directly under e.g. `/usr/lib/cmake`, put them in a subdirectory like `/usr/lib/cmake/gherkin`. C++ CMake files are currently installed under e.g. `/usr/lib/cmake/cucumber_gherkin`; I think the leading `cucumber_` corresponds to the `cucumber::` C++ namespace, which is why I have chosen just `gherkin` for the C CMake files. --- c/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/c/CMakeLists.txt b/c/CMakeLists.txt index 9806b5742..62aa15049 100644 --- a/c/CMakeLists.txt +++ b/c/CMakeLists.txt @@ -159,9 +159,9 @@ install( install( FILES "${project_config}" - DESTINATION "${config_install_dir}") + DESTINATION "${config_install_dir}/gherkin") install( EXPORT "${targets_export_name}" NAMESPACE "${namespace}" - DESTINATION "${config_install_dir}") + DESTINATION "${config_install_dir}/gherkin")