Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Consolidate cmake package config templates into cmake/package/
Move all cmake package config template files into a single cmake/package/
directory:
- CppUTestConfig.cmake.install.in (from repo root)
- CppUTestConfig.cmake.build.in (from repo root)
- CppUTestConfig.cmake.autotools.in (from build/cmake_package_files/)
- CppUTestTargets.cmake.autotools.in (from build/cmake_package_files/)
- CppUTestTargets-relwithdebinfo.cmake.autotools.in (from build/cmake_package_files/)
- CppUTestConfigVersion.cmake (from build/cmake_package_files/)

Also remove the stale pre-generated static cmake files from
build/cmake_package_files/ that are superseded by the autotools templates.

Update cmake/install.cmake and Makefile.am with the new paths.
  • Loading branch information
thetic committed Mar 3, 2026
commit d1da5cd9bdc9fd1dfe7de4f55dbecc6e1c952a39
8 changes: 4 additions & 4 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -41,21 +41,21 @@ cmakescripts_DATA = \

cmakedir = $(libdir)/CppUTest/cmake
cmake_DATA = \
build/cmake_package_files/CppUTestConfigVersion.cmake
cmake/package/CppUTestConfigVersion.cmake

# The three cmake files below embed the install prefix and libdir, so they must
# be generated from templates at install time rather than copied as static files.
# This ensures the correct paths are used even when --libdir differs from the
# default (e.g. Debian multiarch: lib/x86_64-linux-gnu instead of lib).
install-data-hook:
sed -e "s|%%PREFIX%%|$(prefix)|g" \
$(srcdir)/build/cmake_package_files/CppUTestConfig.cmake.autotools.in \
$(srcdir)/cmake/package/CppUTestConfig.cmake.autotools.in \
> "$(DESTDIR)$(cmakedir)/CppUTestConfig.cmake"
sed -e "s|%%PREFIX%%|$(prefix)|g" \
$(srcdir)/build/cmake_package_files/CppUTestTargets.cmake.autotools.in \
$(srcdir)/cmake/package/CppUTestTargets.cmake.autotools.in \
> "$(DESTDIR)$(cmakedir)/CppUTestTargets.cmake"
sed -e "s|%%LIBDIR%%|$(libdir)|g" \
$(srcdir)/build/cmake_package_files/CppUTestTargets-relwithdebinfo.cmake.autotools.in \
$(srcdir)/cmake/package/CppUTestTargets-relwithdebinfo.cmake.autotools.in \
> "$(DESTDIR)$(cmakedir)/CppUTestTargets-relwithdebinfo.cmake"

uninstall-local:
Expand Down
32 changes: 0 additions & 32 deletions build/cmake_package_files/CppUTestConfig.cmake

This file was deleted.

29 changes: 0 additions & 29 deletions build/cmake_package_files/CppUTestTargets-relwithdebinfo.cmake

This file was deleted.

101 changes: 0 additions & 101 deletions build/cmake_package_files/CppUTestTargets.cmake

This file was deleted.

4 changes: 2 additions & 2 deletions cmake/install.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ include(CMakePackageConfigHelpers)

set(CPPUTEST_CONFIG_DEST "${LIB_INSTALL_DIR}/CppUTest/cmake")

configure_package_config_file(CppUTestConfig.cmake.install.in
configure_package_config_file(${CMAKE_CURRENT_LIST_DIR}/package/CppUTestConfig.cmake.install.in
${CMAKE_CURRENT_BINARY_DIR}/install/CppUTestConfig.cmake
INSTALL_DESTINATION "${CPPUTEST_CONFIG_DEST}"
PATH_VARS INCLUDE_INSTALL_DIR LIB_INSTALL_DIR)
Expand Down Expand Up @@ -49,7 +49,7 @@ install(
${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules/_CppUTestDiscovery.cmake
DESTINATION "${CPPUTEST_CONFIG_DEST}/Modules"
)
configure_package_config_file(CppUTestConfig.cmake.build.in
configure_package_config_file(${CMAKE_CURRENT_LIST_DIR}/package/CppUTestConfig.cmake.build.in
${CMAKE_CURRENT_BINARY_DIR}/CppUTestConfig.cmake
INSTALL_DESTINATION ${CMAKE_CURRENT_BINARY_DIR}
PATH_VARS INCLUDE_DIR CMAKE_CURRENT_BINARY_DIR
Expand Down