From de6e8747ab624831b2178e6f9ddec48903aec848 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Wed, 20 Aug 2025 10:03:48 +0100 Subject: [PATCH] cmake: Don't override CMAKE_INSTALL_PREFIX if set by user The README says that it can be changed, but it was hard-coded here. Signed-off-by: Simon McVittie --- cmake/compilers/gnu.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmake/compilers/gnu.cmake b/cmake/compilers/gnu.cmake index e46d1318..9a00d3e4 100644 --- a/cmake/compilers/gnu.cmake +++ b/cmake/compilers/gnu.cmake @@ -22,4 +22,6 @@ add_compile_options(-Wno-format-zero-length -Wno-format-nonliteral) # that rely on the compiler not optimising them away, so disable it add_compile_options(-fno-strict-aliasing) -set(CMAKE_INSTALL_PREFIX /opt/quake3) +if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) + set(CMAKE_INSTALL_PREFIX /opt/quake3) +endif()