Browse Source

more fixups

Signed-off-by: crueter <crueter@eden-emu.dev>
pull/3016/head
crueter 1 month ago
parent
commit
bb8b72eec9
No known key found for this signature in database GPG Key ID: 425ACD2D4830EBC6
  1. 6
      CMakeModules/EdenModule.cmake
  2. 22
      src/CMakeLists.txt
  3. 2
      src/Eden/Interface/SettingsInterface.h
  4. 2
      src/Eden/Models/SettingsModel.h
  5. 42
      src/Eden/Native/CMakeLists.txt
  6. 20
      src/Eden/Native/main.cpp
  7. 2
      src/dedicated_room/CMakeLists.txt
  8. 4
      src/qt_common/externals/cpmfile.json
  9. 4
      src/yuzu/CMakeLists.txt

6
CMakeModules/EdenModule.cmake

@ -7,6 +7,9 @@
cmake_minimum_required(VERSION 3.16)
function(EdenModule)
qt_policy(SET QTP0001 NEW)
qt_policy(SET QTP0004 NEW)
set(oneValueArgs
NAME
URI
@ -39,8 +42,11 @@ function(EdenModule)
if (DEFINED MODULE_LIBRARIES)
target_link_libraries(${LIB_NAME} PRIVATE ${MODULE_LIBRARIES})
target_link_libraries(${LIB_NAME}plugin PRIVATE ${MODULE_LIBRARIES})
endif()
target_link_libraries(${LIB_NAME} PRIVATE Carboxyl::Base Carboxyl::Styles)
target_link_libraries(${LIB_NAME}plugin PRIVATE Carboxyl::Base Carboxyl::Styles)
target_link_libraries(${LIB_NAME} PUBLIC ${LIB_NAME}plugin)
endfunction()

22
src/CMakeLists.txt

@ -120,7 +120,6 @@ else()
add_compile_options(
-Werror=all
-Werror=extra
-Werror=missing-declarations
-Werror=shadow
-Werror=unused
@ -209,17 +208,23 @@ else()
endif()
add_subdirectory(common)
add_subdirectory(network)
if (YUZU_ROOM)
add_subdirectory(dedicated_room)
endif()
add_subdirectory(core)
add_subdirectory(audio_core)
add_subdirectory(video_core)
add_subdirectory(hid_core)
add_subdirectory(network)
add_subdirectory(input_common)
add_subdirectory(frontend_common)
add_subdirectory(shader_recompiler)
if (YUZU_ROOM)
add_subdirectory(dedicated_room)
if (YUZU_ROOM_STANDALONE)
add_subdirectory(yuzu_room_standalone)
set_target_properties(yuzu-room PROPERTIES OUTPUT_NAME "eden-room")
endif()
if (YUZU_TESTS)
@ -231,18 +236,15 @@ if (ENABLE_SDL2 AND YUZU_CMD)
set_target_properties(yuzu-cmd PROPERTIES OUTPUT_NAME "eden-cli")
endif()
if (YUZU_ROOM_STANDALONE)
add_subdirectory(yuzu_room_standalone)
set_target_properties(yuzu-room PROPERTIES OUTPUT_NAME "eden-room")
endif()
if (ENABLE_QT)
add_subdirectory(qt_common)
endif()
if (ENABLE_QT_QML)
add_subdirectory(Eden)
elseif(ENABLE_QT_WIDGETS)
endif()
if(ENABLE_QT_WIDGETS)
add_subdirectory(yuzu)
endif()

2
src/Eden/Interface/SettingsInterface.h

@ -9,7 +9,7 @@
#include "QMLSetting.h"
#include "qt_common/config/shared_translation.h"
#include "Models/SettingsModel.h"
#include "Eden/Models/SettingsModel.h"
namespace SettingsCategories {
Q_NAMESPACE

2
src/Eden/Models/SettingsModel.h

@ -5,7 +5,7 @@
#define SETTINGSMODEL_H
#include <QAbstractListModel>
#include "Interface/QMLSetting.h"
#include "Eden/Interface/QMLSetting.h"
class SettingsModel : public QAbstractListModel {
Q_OBJECT

42
src/Eden/Native/CMakeLists.txt

@ -41,8 +41,6 @@ target_link_libraries(eden PRIVATE common core input_common frontend_common qt_c
target_link_libraries(eden PRIVATE Boost::headers glad fmt)
target_link_libraries(eden PRIVATE ${PLATFORM_LIBRARIES} Threads::Threads)
target_link_libraries(eden PRIVATE Vulkan::Headers)
target_compile_definitions(eden PRIVATE
# Use QStringBuilder for string concatenation to reduce
# the overall number of temporary strings created.
@ -58,7 +56,45 @@ target_compile_definitions(eden PRIVATE
-DQT_NO_URL_CAST_FROM_STRING
)
set_target_properties(eden PROPERTIES OUTPUT_NAME "eden")
if (APPLE)
set(MACOSX_ICON "../../dist/eden.icns")
set_source_files_properties(${MACOSX_ICON} PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
target_sources(eden PRIVATE ${MACOSX_ICON})
set_target_properties(eden PROPERTIES MACOSX_BUNDLE TRUE)
set_target_properties(eden PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist)
if (YUZU_USE_BUNDLED_MOLTENVK)
set(MOLTENVK_PLATFORM "macOS")
set(MOLTENVK_VERSION "v1.4.0")
download_moltenvk(${MOLTENVK_PLATFORM} ${MOLTENVK_VERSION})
endif()
set(CMAKE_FIND_LIBRARY_SUFFIXES ".dylib")
find_library(MOLTENVK_LIBRARY MoltenVK REQUIRED)
message(STATUS "Using MoltenVK at ${MOLTENVK_LIBRARY}.")
set_source_files_properties(${MOLTENVK_LIBRARY} PROPERTIES
MACOSX_PACKAGE_LOCATION Frameworks
XCODE_FILE_ATTRIBUTES "CodeSignOnCopy")
target_sources(eden PRIVATE ${MOLTENVK_LIBRARY})
elseif(WIN32)
# compile as a win32 gui application instead of a console application
target_link_libraries(eden PRIVATE Qt6::EntryPointPrivate)
if(MSVC)
target_link_libraries(eden PRIVATE version.lib)
set_target_properties(eden PROPERTIES LINK_FLAGS_RELEASE "/SUBSYSTEM:WINDOWS")
elseif(MINGW)
set_target_properties(eden PROPERTIES LINK_FLAGS_RELEASE "-Wl,--subsystem,windows")
target_link_libraries(eden PRIVATE dwmapi)
endif()
endif()
if (ENABLE_QT_WIDGETS)
set_target_properties(eden PROPERTIES OUTPUT_NAME "eden-qml")
else()
set_target_properties(eden PROPERTIES OUTPUT_NAME "eden")
endif()
include(GNUInstallDirs)
install(TARGETS eden
BUNDLE DESTINATION .

20
src/Eden/Native/main.cpp

@ -1,14 +1,21 @@
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// Qt on macOS doesn't define VMA shit
#if defined(QT_STATICPLUGIN) && !defined(__APPLE__)
#undef VMA_IMPLEMENTATION
#endif
#include <QApplication>
#include <QQmlApplicationEngine>
#include <QQmlContext>
#include "CarboxylApplication.h"
#include "Interface/QMLConfig.h"
#include "Interface/SettingsInterface.h"
#include "Interface/TitleManager.h"
#include "Models/GameListModel.h"
#include "Eden/Interface/QMLConfig.h"
#include "Eden/Interface/SettingsInterface.h"
#include "Eden/Interface/TitleManager.h"
#include "Eden/Models/GameListModel.h"
#include "common/settings_enums.h"
#include "qt_common/config/uisettings.h"
#include "qt_common/qt_common.h"
@ -84,3 +91,8 @@ int main(int argc, char *argv[])
return app.exec();
}
#if !defined(QT_STATICPLUGIN) || defined(__APPLE__)
#define VMA_IMPLEMENTATION
#include "video_core/vulkan_common/vma.h"
#endif

2
src/dedicated_room/CMakeLists.txt

@ -10,7 +10,7 @@ add_library(yuzu-room STATIC EXCLUDE_FROM_ALL
yuzu_room.rc
)
target_link_libraries(yuzu-room PRIVATE common network)
target_link_libraries(yuzu-room PRIVATE common)
if (ENABLE_WEB_SERVICE)
target_compile_definitions(yuzu-room PRIVATE ENABLE_WEB_SERVICE)
target_link_libraries(yuzu-room PRIVATE web_service)

4
src/qt_common/externals/cpmfile.json

@ -19,8 +19,8 @@
"package": "Carboxyl",
"repo": "crueter/Carboxyl",
"git_host": "git.crueter.xyz",
"sha": "a9071022e2",
"hash": "340ae7e3fbc5b01b321e1cd9c8c8b3da4047b00abc5bf5d6388e47f253139d7551bcc006c5606665565f04d3bfc21cd2228e11c221090ea78746a6f72898ecc4",
"sha": "7bb3818c24",
"hash": "57f61145a1bbb976537af1ef9f3b99d4c442ca47f2dd5d86e65e1a612ecf879d3e7f383bef565bd52606e2b3a68264d8d0c8f53375cd0fe4bdd5175bd3f06ec9",
"bundled": "true",
"options": [
"CARBOXYL_DEMO OFF"

4
src/yuzu/CMakeLists.txt

@ -12,8 +12,6 @@ if (YUZU_USE_BUNDLED_QT AND PLATFORM_LINUX)
set(CMAKE_BUILD_RPATH "${CMAKE_BINARY_DIR}/bin/lib/")
endif()
find_package(Qt6 REQUIRED COMPONENTS Widgets)
add_executable(yuzu
Info.plist
about_dialog.cpp
@ -237,7 +235,7 @@ add_executable(yuzu
main_window.h main_window.cpp
)
set_target_properties(yuzu PROPERTIES OUTPUT_NAME "eden-widgets")
set_target_properties(yuzu PROPERTIES OUTPUT_NAME "eden")
if (YUZU_CRASH_DUMPS)
target_sources(yuzu PRIVATE

Loading…
Cancel
Save