CMake: copy settings.conf into the build directory

Having an up-to-date settings.conf in the build directory
makes `calamares -d` in that directory much more predicatable.

This should not have used CMake command `install()`.

FIXES #2075
CLOSEs #2079
This commit is contained in:
Adriaan de Groot 2022-12-18 01:18:33 +01:00
parent 61ce22338a
commit 40b7274c85

View File

@ -585,10 +585,6 @@ install(
### Miscellaneous installs ### Miscellaneous installs
# #
# #
if( settings.conf IS_NEWER_THAN ${CMAKE_BINARY_DIR}/settings.conf )
install(FILES settings.conf DESTINATION ${CMAKE_BINARY_DIR})
endif()
if(INSTALL_POLKIT) if(INSTALL_POLKIT)
install(FILES com.github.calamares.calamares.policy DESTINATION "${POLKITQT-1_POLICY_FILES_INSTALL_DIR}") install(FILES com.github.calamares.calamares.policy DESTINATION "${POLKITQT-1_POLICY_FILES_INSTALL_DIR}")
endif() endif()
@ -605,7 +601,9 @@ install(FILES calamares.desktop DESTINATION ${CMAKE_INSTALL_DATADIR}/application
install(FILES man/calamares.8 DESTINATION ${CMAKE_INSTALL_MANDIR}/man8/) install(FILES man/calamares.8 DESTINATION ${CMAKE_INSTALL_MANDIR}/man8/)
# uninstall target ### Uninstall
#
#
configure_file( configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in" "${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
@ -615,6 +613,17 @@ configure_file(
add_custom_target(uninstall COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake) add_custom_target(uninstall COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
### Developer convenience
#
# The module support files -- .desc files, .conf files -- are copied into the build
# directory so that it is possible to run `calamares -d` from there. Copy the
# top-level settings.conf as well, into the build directory.
if( settings.conf IS_NEWER_THAN ${CMAKE_BINARY_DIR}/settings.conf )
configure_file(settings.conf ${CMAKE_BINARY_DIR}/settings.conf COPYONLY)
endif()
### CMAKE SUMMARY REPORT ### CMAKE SUMMARY REPORT
# #
get_directory_property(SKIPPED_MODULES DIRECTORY src/modules DEFINITION LIST_SKIPPED_MODULES) get_directory_property(SKIPPED_MODULES DIRECTORY src/modules DEFINITION LIST_SKIPPED_MODULES)