From 8da659c47a455ab914b2112ef715de4590994d28 Mon Sep 17 00:00:00 2001 From: Andrey Bychkov Date: Wed, 12 Aug 2026 21:36:53 +0300 Subject: [PATCH] fix: use INSTALL_DIR for cmake install to support flatpak sandbox --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index aa950719..637647a8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -756,7 +756,11 @@ else() endif() endif() file(GLOB CMAKES "cmake/*.cmake" "cmake/*.in") -install(FILES ${CMAKES} DESTINATION ${CMAKE_ROOT}/Modules) +if(INSTALL_DIR) + install(FILES ${CMAKES} DESTINATION ${INSTALL_DIR}/cmake) +else() + install(FILES ${CMAKES} DESTINATION ${CMAKE_ROOT}/Modules) +endif() shstk_is_parent_exists(_pe)