gnucash stable: Fix uninstall target for cmake > 3.25

John Ralls jralls at code.gnucash.org
Tue Jan 28 13:46:06 EST 2025


Updated	 via  https://github.com/Gnucash/gnucash/commit/19591988 (commit)
	from  https://github.com/Gnucash/gnucash/commit/57df6c2b (commit)



commit 19591988e2bc804251d2e553577ba2e5a5140971
Author: John Ralls <jralls at ceridwen.us>
Date:   Tue Jan 28 10:39:42 2025 -0800

    Fix uninstall target for cmake > 3.25
    
    execute_process and exce_program were changed in cmake 3.26 to run
    only at configure time, breaking cmake_uninstall.cmake. The recommened
    replacement is add_custom_target and add_custom_commsnd, but there's
    no way to run a loop in either of those so this commit replaces
    cmake_uninstall.cmake with cmake_uninstall.sh. This works on Microsoft
    Windows beacuse at present we have to build on Windows in a MSYS2
    shell. If at some point we gain the ability to build in a straight
    Windows environment then we'll need a Windows CMD equivalent.



Summary of changes:
 CMakeLists.txt                 |  6 +++---
 cmake/cmake_uninstall.cmake.in | 23 -----------------------
 cmake/cmake_uninstall.sh.in    | 13 +++++++++++++
 3 files changed, 16 insertions(+), 26 deletions(-)
 delete mode 100644 cmake/cmake_uninstall.cmake.in
 create mode 100644 cmake/cmake_uninstall.sh.in



More information about the gnucash-patches mailing list