From 283a535fc9351179b97a5c4462078de7de71b1dd Mon Sep 17 00:00:00 2001 From: wuchangming Date: Wed, 23 Apr 2025 23:50:24 +0800 Subject: [PATCH] fix(cmake): Use CMAKE_BINARY_DIR for installation path Replace relative path with CMAKE_BINARY_DIR in Install.cmake to ensure consistent installation behavior across different platforms and support out-of-source builds. This change follows CMake best practices by keeping generated files within the build directory. --- Install/Install.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Install/Install.cmake b/Install/Install.cmake index fef714c40..2cd1639e5 100644 --- a/Install/Install.cmake +++ b/Install/Install.cmake @@ -1,7 +1,7 @@ include(GNUInstallDirs) if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) - set(CMAKE_INSTALL_PREFIX "./install/" CACHE PATH "..." FORCE) + set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/install" CACHE PATH "..." FORCE) endif() function(install_targets)