Skip to content

Commit 7671af7

Browse files
authored
[C/C++] CMake: Resolve package configuration install destination mismatch (#1536)
# Description @swift-nav/algint-team Fix a mismatch between the configured package configuration file's install destination and the actual install destination. Resolves #1533. # API compatibility **_Does this change introduce a API compatibility risk?_** No, the source code is not changed. Only consumers building and then relocating their package configurations should be affected, and it should simplify the process without breaking existing workflows. ## API compatibility plan **_If the above is "Yes", please detail the compatibility (or migration) plan:_** N/A # JIRA Reference N/A
1 parent 0a93888 commit 7671af7

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

c/src/CMakeLists.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,13 @@ install(
9292
NAMESPACE swiftnav::
9393
)
9494

95+
set(LIBSBP_CFG_INSTALL_DIR "${CMAKE_INSTALL_DATADIR}/libsbp/cmake")
9596
configure_package_config_file(
9697
${CMAKE_CURRENT_SOURCE_DIR}/libsbpConfig.cmake.in
97-
libsbpConfig.cmake
98-
INSTALL_DESTINATION ${CMAKE_INSTALL_DATADIR}
98+
${CMAKE_CURRENT_BINARY_DIR}/libsbpConfig.cmake
99+
INSTALL_DESTINATION ${LIBSBP_CFG_INSTALL_DIR}
99100
)
100101
install(
101102
FILES "${CMAKE_CURRENT_BINARY_DIR}/libsbpConfig.cmake"
102-
DESTINATION ${CMAKE_INSTALL_DATADIR}/libsbp/cmake
103+
DESTINATION ${LIBSBP_CFG_INSTALL_DIR}
103104
)

0 commit comments

Comments
 (0)