2026-02-02 06:17:57 +01:00
|
|
|
# SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
2025-09-15 17:21:18 +02:00
|
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
|
|
2026-03-10 05:37:45 +01:00
|
|
|
set(CMAKE_AUTOMOC ON)
|
|
|
|
|
|
2025-09-15 17:21:18 +02:00
|
|
|
add_library(qt_common STATIC
|
|
|
|
|
qt_common.h
|
|
|
|
|
qt_common.cpp
|
|
|
|
|
|
2025-12-07 07:13:43 +01:00
|
|
|
gamemode.cpp
|
|
|
|
|
gamemode.h
|
|
|
|
|
|
2025-10-15 05:05:03 +02:00
|
|
|
config/uisettings.cpp
|
|
|
|
|
config/uisettings.h
|
|
|
|
|
config/qt_config.cpp
|
|
|
|
|
config/qt_config.h
|
|
|
|
|
config/shared_translation.cpp
|
|
|
|
|
config/shared_translation.h
|
|
|
|
|
|
|
|
|
|
util/path.h util/path.cpp
|
|
|
|
|
util/game.h util/game.cpp
|
|
|
|
|
util/meta.h util/meta.cpp
|
|
|
|
|
util/content.h util/content.cpp
|
|
|
|
|
util/rom.h util/rom.cpp
|
|
|
|
|
util/applet.h util/applet.cpp
|
|
|
|
|
util/compress.h util/compress.cpp
|
2026-02-06 06:37:30 +01:00
|
|
|
util/fs.h util/fs.cpp
|
|
|
|
|
util/mod.h util/mod.cpp
|
2025-10-15 05:05:03 +02:00
|
|
|
|
2025-10-28 03:46:47 +01:00
|
|
|
abstract/frontend.h abstract/frontend.cpp
|
2026-03-10 05:37:45 +01:00
|
|
|
abstract/progress.h abstract/progress.cpp
|
2025-10-15 05:05:03 +02:00
|
|
|
|
2025-10-15 04:54:41 +02:00
|
|
|
qt_string_lookup.h
|
2025-10-15 05:05:03 +02:00
|
|
|
qt_compat.h
|
2025-09-15 17:21:18 +02:00
|
|
|
|
2026-02-06 06:37:30 +01:00
|
|
|
discord/discord.h)
|
2025-09-15 17:21:18 +02:00
|
|
|
|
2025-10-29 13:16:57 +01:00
|
|
|
if (UNIX)
|
|
|
|
|
target_sources(qt_common PRIVATE gui_settings.cpp gui_settings.h)
|
|
|
|
|
endif()
|
|
|
|
|
|
2025-09-15 17:21:18 +02:00
|
|
|
create_target_directory_groups(qt_common)
|
|
|
|
|
|
2025-10-15 05:05:03 +02:00
|
|
|
if (USE_DISCORD_PRESENCE)
|
|
|
|
|
target_sources(qt_common PRIVATE
|
|
|
|
|
discord/discord_impl.cpp
|
|
|
|
|
discord/discord_impl.h
|
|
|
|
|
)
|
2025-10-25 07:28:08 +02:00
|
|
|
target_link_libraries(qt_common PUBLIC DiscordRPC::discord-rpc httplib::httplib)
|
2025-11-16 04:59:30 +01:00
|
|
|
|
2025-10-25 07:28:08 +02:00
|
|
|
if (YUZU_USE_BUNDLED_OPENSSL)
|
2025-11-16 04:59:30 +01:00
|
|
|
target_link_libraries(qt_common PUBLIC OpenSSL::SSL OpenSSL::Crypto)
|
2025-10-25 07:28:08 +02:00
|
|
|
target_compile_definitions(qt_common PRIVATE CPPHTTPLIB_OPENSSL_SUPPORT)
|
|
|
|
|
endif()
|
2025-11-16 04:59:30 +01:00
|
|
|
|
2025-10-15 05:05:03 +02:00
|
|
|
target_compile_definitions(qt_common PUBLIC USE_DISCORD_PRESENCE)
|
|
|
|
|
endif()
|
|
|
|
|
|
2025-09-15 17:21:18 +02:00
|
|
|
# TODO(crueter)
|
|
|
|
|
if (ENABLE_QT)
|
|
|
|
|
target_link_libraries(qt_common PRIVATE Qt6::Widgets)
|
|
|
|
|
endif()
|
|
|
|
|
|
2025-10-15 04:54:41 +02:00
|
|
|
target_compile_definitions(qt_common PUBLIC
|
|
|
|
|
# Use QStringBuilder for string concatenation to reduce
|
|
|
|
|
# the overall number of temporary strings created.
|
|
|
|
|
QT_USE_QSTRINGBUILDER
|
|
|
|
|
|
|
|
|
|
# Disable implicit conversions from/to C strings
|
|
|
|
|
QT_NO_CAST_FROM_ASCII
|
|
|
|
|
QT_NO_CAST_TO_ASCII
|
|
|
|
|
|
|
|
|
|
# Disable implicit type narrowing in signal/slot connect() calls.
|
|
|
|
|
QT_NO_NARROWING_CONVERSIONS_IN_CONNECT
|
|
|
|
|
|
|
|
|
|
# Disable unsafe overloads of QProcess' start() function.
|
|
|
|
|
QT_NO_PROCESS_COMBINED_ARGUMENT_START
|
|
|
|
|
|
|
|
|
|
# Disable implicit QString->QUrl conversions to enforce use of proper resolving functions.
|
|
|
|
|
QT_NO_URL_CAST_FROM_STRING
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
target_link_libraries(qt_common PRIVATE core Qt6::Core Qt6::Concurrent SimpleIni::SimpleIni QuaZip::QuaZip)
|
2025-10-17 20:09:15 +02:00
|
|
|
target_link_libraries(qt_common PUBLIC frozen::frozen-headers)
|
2026-02-04 04:16:39 +01:00
|
|
|
target_link_libraries(qt_common PRIVATE gamemode::headers frontend_common)
|
2025-09-20 22:58:33 +02:00
|
|
|
|
|
|
|
|
if (NOT APPLE AND ENABLE_OPENGL)
|
|
|
|
|
target_compile_definitions(qt_common PUBLIC HAS_OPENGL)
|
|
|
|
|
endif()
|
2025-09-15 17:21:18 +02:00
|
|
|
|
2025-10-10 22:33:15 +02:00
|
|
|
if (UNIX AND NOT APPLE)
|
2025-10-17 22:12:58 +02:00
|
|
|
if (DEFINED Qt6Gui_PRIVATE_INCLUDE_DIRS)
|
2025-10-11 04:31:14 +02:00
|
|
|
target_include_directories(qt_common PRIVATE ${Qt6Gui_PRIVATE_INCLUDE_DIRS})
|
2025-10-17 22:12:58 +02:00
|
|
|
else()
|
|
|
|
|
target_link_libraries(qt_common PRIVATE Qt6::GuiPrivate)
|
2025-10-10 22:33:15 +02:00
|
|
|
endif()
|
2025-09-15 17:21:18 +02:00
|
|
|
endif()
|
2026-03-10 05:37:45 +01:00
|
|
|
|
|
|
|
|
create_target_directory_groups(qt_common)
|