diff --git a/CMakeLists.txt b/CMakeLists.txt index dc23c6135..4298f8c9e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -105,12 +105,6 @@ endif() # Write binaries to a seperate directory. set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/bin") -# Installation directories. Everything goes into one directory. -if(ALLOW_INSTALL) - set(CMAKE_INSTALL_BINDIR "${CMAKE_INSTALL_PREFIX}") - set(CMAKE_INSTALL_LIBDIR "${CMAKE_INSTALL_PREFIX}") -endif() - # Enable large file support on Linux 32-bit platforms. if(CMAKE_SIZEOF_VOID_P EQUAL 4) add_definitions("-D_FILE_OFFSET_BITS=64") diff --git a/CMakeModules/CopyBaseTranslations.cmake b/CMakeModules/CopyBaseTranslations.cmake index 07725304b..b8b37e46d 100644 --- a/CMakeModules/CopyBaseTranslations.cmake +++ b/CMakeModules/CopyBaseTranslations.cmake @@ -42,8 +42,6 @@ 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}" "$/translations") diff --git a/CMakeModules/DuckStationBuildOptions.cmake b/CMakeModules/DuckStationBuildOptions.cmake index f9dcedd60..11add9e3b 100644 --- a/CMakeModules/DuckStationBuildOptions.cmake +++ b/CMakeModules/DuckStationBuildOptions.cmake @@ -10,7 +10,6 @@ option(DISABLE_SSE4 "Build with SSE4 instructions disabled, reduces performance" 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) endif() if(APPLE) option(SKIP_POSTPROCESS_BUNDLE "Disable bundle post-processing, including Qt additions" OFF) diff --git a/CMakeModules/DuckStationBuildSummary.cmake b/CMakeModules/DuckStationBuildSummary.cmake index 9ad337588..b45b86ec3 100644 --- a/CMakeModules/DuckStationBuildSummary.cmake +++ b/CMakeModules/DuckStationBuildSummary.cmake @@ -26,15 +26,6 @@ if(BUILD_TESTS) message(STATUS "Building unit tests.") endif() -if(ALLOW_INSTALL) - message(STATUS "Creating self-contained install at ${CMAKE_INSTALL_PREFIX}") - - # Stop users being silly. - if("${CMAKE_INSTALL_PREFIX}" MATCHES "^/usr") - message(FATAL_ERROR "You are trying to install DuckStation into a system directory, this is not supported. Please use a different CMAKE_INSTALL_PREFIX.") - endif() -endif() - # Refuse to build in Arch package environments. My license does not allow for packages, and I'm sick of # dealing with people complaining about things broken by packagers. This is why we can't have nice things. if(DEFINED ENV{DEBUGINFOD_URLS}) diff --git a/CMakeModules/DuckStationDependencies.cmake b/CMakeModules/DuckStationDependencies.cmake index c5f735b19..a13fcab33 100644 --- a/CMakeModules/DuckStationDependencies.cmake +++ b/CMakeModules/DuckStationDependencies.cmake @@ -13,9 +13,9 @@ find_package(SDL3 3.2.22 REQUIRED) find_package(zstd 1.5.7 REQUIRED) find_package(WebP REQUIRED) # v1.4.0, spews an error on Linux because no pkg-config. find_package(ZLIB REQUIRED) # 1.3, but Mac currently doesn't use it. -find_package(PNG 1.6.44 REQUIRED) # 1.6.48, but Flatpak is out of date. +find_package(PNG 1.6.50 REQUIRED) find_package(JPEG REQUIRED) -find_package(Freetype 2.13.2 REQUIRED) # 2.13.3, but flatpak is still on 2.13.2. +find_package(Freetype 2.13.3 REQUIRED) # 2.13.3, but flatpak is still on 2.13.2. find_package(plutosvg 0.0.6 REQUIRED) find_package(cpuinfo REQUIRED) find_package(DiscordRPC 3.4.0 REQUIRED) @@ -40,14 +40,13 @@ if(ENABLE_WAYLAND) endif() if(BUILD_QT_FRONTEND) - # 6.9.1, but flatpak stuck on 6.9.0 because they love to ship vulnerable software. - find_package(Qt6 6.9.0 COMPONENTS Core Gui Widgets LinguistTools REQUIRED) + find_package(Qt6 6.9.2 COMPONENTS Core Gui Widgets LinguistTools REQUIRED) endif() find_package(Shaderc REQUIRED) find_package(spirv_cross_c_shared REQUIRED) -if(LINUX AND NOT ALLOW_INSTALL) +if(LINUX) # We need to add the rpath for shaderc to the executable. get_target_property(SHADERC_LIBRARY Shaderc::shaderc_shared IMPORTED_LOCATION) get_filename_component(SHADERC_LIBRARY_DIRECTORY ${SHADERC_LIBRARY} DIRECTORY) diff --git a/CMakeModules/DuckStationUtils.cmake b/CMakeModules/DuckStationUtils.cmake index 565b710bf..058dafe19 100644 --- a/CMakeModules/DuckStationUtils.cmake +++ b/CMakeModules/DuckStationUtils.cmake @@ -246,22 +246,6 @@ function(get_scm_version) endif() endfunction() -function(install_imported_dep_library name) - get_target_property(SONAME "${name}" IMPORTED_SONAME_RELEASE) - get_target_property(LOCATION "${name}" IMPORTED_LOCATION_RELEASE) - - # Only install if it's not a system library. - foreach(path ${CMAKE_PREFIX_PATH}) - if (NOT "${LOCATION}" MATCHES "^${path}") - message(STATUS "Not installing imported system library ${name}") - return() - endif() - endforeach() - - message(STATUS "Installing imported library ${SONAME}") - install(FILES "${LOCATION}" RENAME "${SONAME}" DESTINATION "${CMAKE_INSTALL_LIBDIR}") -endfunction() - function(add_debug_symbol_flag var) # CMake's regex engine is missing so many features... set(value "${${var}}") diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 1ab2717f0..86366db49 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -221,12 +221,6 @@ function(add_core_resources target) endif() add_resources(${target} ${path} ${CMAKE_SOURCE_DIR}/data/resources/) endforeach() - if(ALLOW_INSTALL) - install_imported_dep_library(cpuinfo::cpuinfo) - install_imported_dep_library(DiscordRPC::discord-rpc) - install_imported_dep_library(libzip::zip) - install(DIRECTORY "$/resources" DESTINATION "${CMAKE_INSTALL_BINDIR}") - endif() # Linux platforms need a copy of the .desktop and icon file because Wayland stupidity. # See QtHost::EarlyProcessStartup() for where this is used and why. We still need to set it when running diff --git a/src/duckstation-qt/CMakeLists.txt b/src/duckstation-qt/CMakeLists.txt index d7a936366..0b42c4558 100644 --- a/src/duckstation-qt/CMakeLists.txt +++ b/src/duckstation-qt/CMakeLists.txt @@ -271,11 +271,6 @@ elseif(APPLE) set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/DuckStation.icns" PROPERTIES MACOSX_PACKAGE_LOCATION Resources) endif() -if(ALLOW_INSTALL) - # Install main binary. - install(TARGETS duckstation-qt RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}") -endif() - # Compile qrc to a binary file. if(NOT APPLE) set(RCC_FILE "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/resources/duckstation-qt.rcc") @@ -298,9 +293,6 @@ if(NOT APPLE) foreach (QM_FILE IN LISTS QM_FILES) get_filename_component(QM_FILE_NAME ${QM_FILE} NAME) add_custom_command(TARGET duckstation-qt POST_BUILD COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${QM_FILE}" "${QM_OUTPUT_DIR}/${QM_FILE_NAME}") - if(ALLOW_INSTALL) - install(FILES "${QM_FILE}" DESTINATION "${CMAKE_INSTALL_BINDIR}/translations") - endif() endforeach() else() foreach (QM_FILE IN LISTS QM_FILES) diff --git a/src/util/CMakeLists.txt b/src/util/CMakeLists.txt index 1168b9da1..74984c090 100644 --- a/src/util/CMakeLists.txt +++ b/src/util/CMakeLists.txt @@ -324,15 +324,5 @@ function(add_util_resources target) target_sources(${target} PRIVATE ${version_lib}) set_source_files_properties(${target} PRIVATE ${version_lib} PROPERTIES MACOSX_PACKAGE_LOCATION Frameworks) endforeach() - elseif(ALLOW_INSTALL) - # Ensure we look for dependency libraries in the installation directory. - set_target_properties(${target} PROPERTIES INSTALL_RPATH "$ORIGIN") - - # Copy dependency libraries to installation directory. - install_imported_dep_library(SDL3::SDL3) - install_imported_dep_library(Shaderc::shaderc_shared) - install_imported_dep_library(spirv-cross-c-shared) - install_imported_dep_library(SoundTouch::SoundTouchDLL) - install_imported_dep_library(plutosvg::plutosvg) endif() endfunction()