mirror of
https://github.com/shadps4-emu/shadps4-qtlauncher.git
synced 2026-01-31 01:05:16 +01:00
63 lines
1.6 KiB
CMake
63 lines
1.6 KiB
CMake
# SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
set(BUILD_SHARED_LIBS OFF)
|
|
set(BUILD_TESTING OFF)
|
|
set_directory_properties(PROPERTIES
|
|
EXCLUDE_FROM_ALL ON
|
|
SYSTEM ON
|
|
)
|
|
|
|
# Set CMP0069 policy to "NEW" in order to ensure consistent behavior when building external targets with LTO enabled
|
|
set(CMAKE_POLICY_DEFAULT_CMP0069 NEW)
|
|
|
|
if (MSVC)
|
|
# Silence "deprecation" warnings
|
|
add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS)
|
|
endif()
|
|
|
|
# fmtlib
|
|
if (NOT TARGET fmt::fmt)
|
|
add_subdirectory(fmt)
|
|
endif()
|
|
|
|
# SDL3
|
|
if (NOT TARGET SDL3::SDL3)
|
|
set(SDL_TEST_LIBRARY OFF)
|
|
set(SDL_PIPEWIRE OFF)
|
|
add_subdirectory(sdl3)
|
|
endif()
|
|
|
|
# vulkan-headers
|
|
if (NOT TARGET Vulkan::Headers)
|
|
set(VULKAN_HEADERS_ENABLE_MODULE OFF)
|
|
add_subdirectory(vulkan-headers)
|
|
endif()
|
|
|
|
# Toml11
|
|
if (NOT TARGET toml11::toml11)
|
|
add_subdirectory(toml11)
|
|
|
|
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
|
if (CMAKE_CXX_COMPILER_FRONTEND_VARIANT STREQUAL "MSVC")
|
|
get_target_property(_toml11_compile_options toml11 INTERFACE_COMPILE_OPTIONS)
|
|
list(REMOVE_ITEM _toml11_compile_options "/Zc:preprocessor")
|
|
set_target_properties(toml11 PROPERTIES INTERFACE_COMPILE_OPTIONS ${_toml11_compile_options})
|
|
endif()
|
|
endif()
|
|
endif()
|
|
|
|
# pugixml
|
|
if (NOT TARGET pugixml::pugixml)
|
|
add_subdirectory(pugixml)
|
|
endif()
|
|
|
|
# Apple-only dependencies
|
|
if (APPLE)
|
|
# MoltenVK
|
|
if (NOT TARGET MoltenVK)
|
|
add_subdirectory(MoltenVK)
|
|
endif()
|
|
endif()
|
|
|
|
add_subdirectory(volk) |