CI/Flatpak: Improve install behaviour

Use "standard" install path.
This commit is contained in:
Stenzek
2024-09-23 17:22:33 +10:00
parent dae38cb309
commit d67b826033
11 changed files with 51 additions and 20 deletions

View File

@ -42,6 +42,8 @@ function(copy_base_translations target)
target_sources(${target} PRIVATE ${path})
if(APPLE)
set_source_files_properties(${path} PROPERTIES MACOSX_PACKAGE_LOCATION Resources/translations)
elseif(ALLOW_INSTALL)
install(FILES "${path}" DESTINATION "${CMAKE_INSTALL_BINDIR}/translations")
else()
add_custom_command(TARGET ${target} POST_BUILD
COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${path}" "$<TARGET_FILE_DIR:${target}>/translations")

View File

@ -10,6 +10,7 @@ if(LINUX OR BSD)
option(ENABLE_X11 "Support X11 window system" ON)
option(ENABLE_WAYLAND "Support Wayland window system" ON)
option(ALLOW_INSTALL "Allow installation to CMAKE_INSTALL_PREFIX" OFF)
option(INSTALL_SELF_CONTAINED "Make self-contained install, i.e. everything in one directory" ON)
endif()
if(APPLE)
option(SKIP_POSTPROCESS_BUNDLE "Disable bundle post-processing, including Qt additions" OFF)

View File

@ -28,6 +28,13 @@ if(ALLOW_INSTALL)
message(WARNING "Install target is enabled. This will install all DuckStation files into:
${CMAKE_INSTALL_PREFIX}
It does **not** use the LSB subdirectories of bin, share, etc, so you should disable this option if it is set to /usr or /usr/local.")
if(INSTALL_SELF_CONTAINED)
message(STATUS "Creating self-contained install at ${CMAKE_INSTALL_PREFIX}")
else()
message(STATUS "Creating relative install at ${CMAKE_INSTALL_PREFIX}")
message(STATUS " CMAKE_INSTALL_BINDIR: ${CMAKE_INSTALL_BINDIR}")
endif()
endif()
if(NOT IS_SUPPORTED_COMPILER)

View File

@ -225,5 +225,5 @@ endfunction()
function(install_imported_dep_library name)
get_target_property(SONAME "${name}" IMPORTED_SONAME_RELEASE)
get_target_property(LOCATION "${name}" IMPORTED_LOCATION_RELEASE)
install(FILES "${LOCATION}" RENAME "${SONAME}" DESTINATION "${CMAKE_INSTALL_PREFIX}")
install(FILES "${LOCATION}" RENAME "${SONAME}" DESTINATION "${CMAKE_INSTALL_LIBDIR}")
endfunction()

View File

@ -6,14 +6,14 @@
FIND_PATH(
LIBBACKTRACE_INCLUDE_DIR backtrace.h
HINTS /usr/include /usr/local/include
HINTS "${CMAKE_PREFIX_PATH}/include" /usr/include /usr/local/include
${LIBBACKTRACE_PATH_INCLUDES}
)
FIND_LIBRARY(
LIBBACKTRACE_LIBRARY
NAMES backtrace
PATHS ${ADDITIONAL_LIBRARY_PATHS} ${LIBBACKTRACE_PATH_LIB}
PATHS "${CMAKE_PREFIX_PATH}/lib" "${CMAKE_PREFIX_PATH}/lib64" ${ADDITIONAL_LIBRARY_PATHS} ${LIBBACKTRACE_PATH_LIB}
)
include(FindPackageHandleStandardArgs)