Skip to content

Commit 31a17c7

Browse files
committed
Add package config file settings (incomplete)
For now, this is a test of the configuration mechanism, to see how cmake's FetchContent module and CPM treats it.
1 parent 16e9126 commit 31a17c7

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

CMakeLists.txt

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,3 +114,27 @@ endif ()
114114

115115
# output_ansi_demo()
116116
# dump(CMAKE_MODULE_PATH FOO BAR PROJECT_NAME)
117+
118+
# -------------------------------------------------------------------------------------------------------------- #
119+
# TODO: Package Configuration
120+
# -------------------------------------------------------------------------------------------------------------- #
121+
122+
include(CMakePackageConfigHelpers)
123+
124+
configure_package_config_file(
125+
"resources/cmake/rsp-cmake-scripts-config.cmake.in"
126+
"${CMAKE_CURRENT_BINARY_DIR}/rsp-cmake-scripts-config.cmake"
127+
128+
INSTALL_DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/rsp"
129+
#PATH_VARS INCLUDE_INSTALL_DIR SYSCONFIG_INSTALL_DIR
130+
)
131+
132+
# TODO: CMake Version file
133+
134+
install(
135+
FILES
136+
"${CMAKE_CURRENT_BINARY_DIR}/rsp-cmake-scripts-config.cmake"
137+
# "${CMAKE_CURRENT_BINARY_DIR}/FooConfigVersion.cmake"
138+
DESTINATION
139+
"${CMAKE_INSTALL_LIBDIR}/cmake/rsp"
140+
)

0 commit comments

Comments
 (0)