build: use CMAKE_INSTALL_BINDIR when installing runtime artifacts

On windows override this to be .
On macOS set it to the MacOS folder in the bundle
This commit is contained in:
sithlord48
2025-11-08 12:09:35 -05:00
committed by Chris Rizzitello
parent 57d36b51af
commit 1556908ef6
5 changed files with 26 additions and 23 deletions

View File

@ -162,12 +162,14 @@ configure_libs()
# setup install paths
include(GNUInstallDirs)
if (WIN32)
set(CMAKE_INSTALL_BINDIR .)
set(CMAKE_INSTALL_LICENSE_DIR .)
set(CMAKE_INSTALL_I18N_DIR translations)
elseif(UNIX AND NOT APPLE)
set(CMAKE_INSTALL_LICENSE_DIR ${CMAKE_INSTALL_DATADIR}/licenses/${CMAKE_PROJECT_NAME})
set(CMAKE_INSTALL_I18N_DIR ${CMAKE_INSTALL_DATADIR}/${CMAKE_PROJECT_NAME}/translations)
else()
set(CMAKE_INSTALL_BINDIR $<TARGET_BUNDLE_CONTENT_DIR:${CMAKE_PROJECT_PROPER_NAME}>/MacOS)
set(CMAKE_INSTALL_LICENSE_DIR $<TARGET_BUNDLE_CONTENT_DIR:${CMAKE_PROJECT_PROPER_NAME}>/Resources)
set(CMAKE_INSTALL_I18N_DIR $<TARGET_BUNDLE_CONTENT_DIR:${CMAKE_PROJECT_PROPER_NAME}>/MacOS/translations)
endif()