mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-04-10 05:28:56 +02:00
Build fixes
Signed-off-by: crueter <crueter@eden-emu.dev>
This commit is contained in:
parent
1516568a30
commit
34a6dfd2a8
8 changed files with 88 additions and 23 deletions
|
|
@ -15,10 +15,6 @@ cmake -G Xcode -B build/ios \
|
||||||
-DDEPLOYMENT_TARGET=16.0 \
|
-DDEPLOYMENT_TARGET=16.0 \
|
||||||
-DCMAKE_C_COMPILER="$(xcrun --sdk iphoneos --find clang)" \
|
-DCMAKE_C_COMPILER="$(xcrun --sdk iphoneos --find clang)" \
|
||||||
-DCMAKE_CXX_COMPILER="$(xcrun --sdk iphoneos --find clang++)" \
|
-DCMAKE_CXX_COMPILER="$(xcrun --sdk iphoneos --find clang++)" \
|
||||||
-DENABLE_LIBUSB=OFF \
|
|
||||||
-DENABLE_QT=OFF \
|
|
||||||
-DENABLE_WEB_SERVICE=OFF \
|
|
||||||
-DENABLE_CUBEB=OFF \
|
|
||||||
-DCMAKE_BUILD_TYPE=Release \
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
"$@"
|
"$@"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,29 @@ include(CMakeDependentOption)
|
||||||
include(CTest)
|
include(CTest)
|
||||||
include(CPMUtil)
|
include(CPMUtil)
|
||||||
|
|
||||||
|
# TODO(crueter): Make this more automatic.
|
||||||
|
if (IOS)
|
||||||
|
list(APPEND CMAKE_FIND_ROOT_PATH "${CMAKE_OSX_SYSROOT_INT}" CACHE INTERNAL "")
|
||||||
|
list(APPEND CMAKE_PROGRAM_PATH "/opt/homebrew/bin" CACHE INTERNAL "")
|
||||||
|
|
||||||
|
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM BOTH CACHE INTERNAL "")
|
||||||
|
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH CACHE INTERNAL "")
|
||||||
|
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH CACHE INTERNAL "")
|
||||||
|
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE BOTH CACHE INTERNAL "")
|
||||||
|
|
||||||
|
list(LENGTH CMAKE_OSX_ARCHITECTURES _arch_len)
|
||||||
|
if (NOT _arch_len EQUAL 1)
|
||||||
|
message(FATAL_ERROR "CMAKE_OSX_ARCHITECTURES must contain exactly one architecture.")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# TODO(crueter): Proper handling for this.
|
||||||
|
if (CMAKE_OSX_ARCHITECTURES STREQUAL arm64)
|
||||||
|
set(CMAKE_SYSTEM_PROCESSOR aarch64)
|
||||||
|
else()
|
||||||
|
set(CMAKE_SYSTEM_PROCESSOR ${CMAKE_OSX_ARCHITECTURES})
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
if (NOT DEFINED ARCHITECTURE)
|
if (NOT DEFINED ARCHITECTURE)
|
||||||
message(FATAL_ERROR "Architecture didn't make it out of scope, did you delete DetectArchitecture.cmake?")
|
message(FATAL_ERROR "Architecture didn't make it out of scope, did you delete DetectArchitecture.cmake?")
|
||||||
endif()
|
endif()
|
||||||
|
|
@ -67,7 +90,13 @@ if (YUZU_STATIC_ROOM)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# qt stuff
|
# qt stuff
|
||||||
option(ENABLE_QT "Enable the Qt frontend" ON)
|
if (IOS OR ANDROID)
|
||||||
|
set(_default_qt OFF)
|
||||||
|
else()
|
||||||
|
set(_default_qt ON)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
option(ENABLE_QT "Enable the Qt frontend" ${_default_qt})
|
||||||
option(ENABLE_QT_TRANSLATION "Enable translations for the Qt frontend" OFF)
|
option(ENABLE_QT_TRANSLATION "Enable translations for the Qt frontend" OFF)
|
||||||
cmake_dependent_option(ENABLE_UPDATE_CHECKER "Enable update checker (for Qt and Android)" OFF "ENABLE_QT OR ANDROID" OFF)
|
cmake_dependent_option(ENABLE_UPDATE_CHECKER "Enable update checker (for Qt and Android)" OFF "ENABLE_QT OR ANDROID" OFF)
|
||||||
cmake_dependent_option(YUZU_USE_QT_MULTIMEDIA "Use QtMultimedia for Camera" OFF "NOT YUZU_USE_BUNDLED_QT" OFF)
|
cmake_dependent_option(YUZU_USE_QT_MULTIMEDIA "Use QtMultimedia for Camera" OFF "NOT YUZU_USE_BUNDLED_QT" OFF)
|
||||||
|
|
@ -179,7 +208,8 @@ endif()
|
||||||
cmake_dependent_option(YUZU_USE_EXTERNAL_SDL2 "Build SDL2 from external source" OFF "NOT MSVC;NOT ANDROID" OFF)
|
cmake_dependent_option(YUZU_USE_EXTERNAL_SDL2 "Build SDL2 from external source" OFF "NOT MSVC;NOT ANDROID" OFF)
|
||||||
cmake_dependent_option(YUZU_USE_BUNDLED_SDL2 "Download bundled SDL2 build" "${EXT_DEFAULT}" "NOT ANDROID" OFF)
|
cmake_dependent_option(YUZU_USE_BUNDLED_SDL2 "Download bundled SDL2 build" "${EXT_DEFAULT}" "NOT ANDROID" OFF)
|
||||||
|
|
||||||
option(ENABLE_CUBEB "Enables the cubeb audio backend" ON)
|
# TODO(crueter): did not find header 'AudioHardware.h' in framework 'CoreAudio'
|
||||||
|
cmake_dependent_option(ENABLE_CUBEB "Enables the cubeb audio backend" ON "NOT IOS" OFF)
|
||||||
|
|
||||||
# ffmpeg
|
# ffmpeg
|
||||||
option(YUZU_USE_BUNDLED_FFMPEG "Download bundled FFmpeg" ${EXT_DEFAULT})
|
option(YUZU_USE_BUNDLED_FFMPEG "Download bundled FFmpeg" ${EXT_DEFAULT})
|
||||||
|
|
@ -194,7 +224,7 @@ endif()
|
||||||
option(YUZU_USE_BUNDLED_SIRIT "Download bundled sirit" ${BUNDLED_SIRIT_DEFAULT})
|
option(YUZU_USE_BUNDLED_SIRIT "Download bundled sirit" ${BUNDLED_SIRIT_DEFAULT})
|
||||||
|
|
||||||
# FreeBSD 15+ has libusb, versions below should disable it
|
# FreeBSD 15+ has libusb, versions below should disable it
|
||||||
cmake_dependent_option(ENABLE_LIBUSB "Enable the use of LibUSB" ON "WIN32 OR PLATFORM_LINUX OR PLATFORM_FREEBSD OR APPLE" OFF)
|
cmake_dependent_option(ENABLE_LIBUSB "Enable the use of LibUSB" ON "WIN32 OR PLATFORM_LINUX OR PLATFORM_FREEBSD OR (APPLE AND NOT IOS)" OFF)
|
||||||
|
|
||||||
cmake_dependent_option(ENABLE_OPENGL "Enable OpenGL" ON "NOT (WIN32 AND ARCHITECTURE_arm64) AND NOT APPLE" OFF)
|
cmake_dependent_option(ENABLE_OPENGL "Enable OpenGL" ON "NOT (WIN32 AND ARCHITECTURE_arm64) AND NOT APPLE" OFF)
|
||||||
mark_as_advanced(FORCE ENABLE_OPENGL)
|
mark_as_advanced(FORCE ENABLE_OPENGL)
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ This file is based off of Yuzu and Dynarmic.
|
||||||
# Do note that situations where multiple architectures are defined
|
# Do note that situations where multiple architectures are defined
|
||||||
# should NOT be too dependent on the architecture
|
# should NOT be too dependent on the architecture
|
||||||
# otherwise, you may end up with duplicate code
|
# otherwise, you may end up with duplicate code
|
||||||
if (CMAKE_OSX_ARCHITECTURES)
|
if (DEFINED CMAKE_OSX_ARCHITECTURES)
|
||||||
set(MULTIARCH_BUILD 1)
|
set(MULTIARCH_BUILD 1)
|
||||||
set(ARCHITECTURE "${CMAKE_OSX_ARCHITECTURES}")
|
set(ARCHITECTURE "${CMAKE_OSX_ARCHITECTURES}")
|
||||||
if (IOS)
|
if (IOS)
|
||||||
|
|
|
||||||
3
externals/libusb/CMakeLists.txt
vendored
3
externals/libusb/CMakeLists.txt
vendored
|
|
@ -24,7 +24,8 @@ if (MINGW OR PLATFORM_LINUX OR APPLE)
|
||||||
message(FATAL_ERROR "Required program `autoconf` not found.")
|
message(FATAL_ERROR "Required program `autoconf` not found.")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_program(LIBTOOLIZE libtoolize)
|
find_program(LIBTOOLIZE
|
||||||
|
NAMES libtoolize glibtoolize)
|
||||||
if ("${LIBTOOLIZE}" STREQUAL "LIBTOOLIZE-NOTFOUND")
|
if ("${LIBTOOLIZE}" STREQUAL "LIBTOOLIZE-NOTFOUND")
|
||||||
message(FATAL_ERROR "Required program `libtoolize` not found.")
|
message(FATAL_ERROR "Required program `libtoolize` not found.")
|
||||||
endif()
|
endif()
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@ import UIKit
|
||||||
import Foundation
|
import Foundation
|
||||||
import QuartzCore.CAMetalLayer
|
import QuartzCore.CAMetalLayer
|
||||||
|
|
||||||
@main
|
|
||||||
public struct AppUI {
|
public struct AppUI {
|
||||||
|
|
||||||
public static let shared = AppUI()
|
public static let shared = AppUI()
|
||||||
|
|
|
||||||
|
|
@ -20,15 +20,54 @@ add_executable(eden-ios
|
||||||
PomeloApp.swift
|
PomeloApp.swift
|
||||||
ContentView.swift
|
ContentView.swift
|
||||||
)
|
)
|
||||||
|
|
||||||
|
set(MACOSX_BUNDLE_GUI_IDENTIFIER "dev.eden-emu.eden")
|
||||||
|
set(MACOSX_BUNDLE_BUNDLE_NAME "Eden")
|
||||||
|
set(MACOSX_BUNDLE_INFO_STRING "Eden: A high-performance Nintendo Switch emulator")
|
||||||
|
|
||||||
|
# TODO(crueter): Copyright, and versioning
|
||||||
|
|
||||||
# Keep bundle identifier as-is, for compatibility sake
|
# Keep bundle identifier as-is, for compatibility sake
|
||||||
set_target_properties(eden-ios PROPERTIES
|
set_target_properties(eden-ios PROPERTIES
|
||||||
XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER "com.yuzu-emu.yuzu"
|
|
||||||
XCODE_ATTRIBUTE_DEVELOPMENT_TEAM "YUZU1234"
|
|
||||||
XCODE_ATTRIBUTE_SWIFT_OBJC_BRIDGING_HEADER "${CMAKE_CURRENT_SOURCE_DIR}/AppUI-Bridging-Header.h"
|
XCODE_ATTRIBUTE_SWIFT_OBJC_BRIDGING_HEADER "${CMAKE_CURRENT_SOURCE_DIR}/AppUI-Bridging-Header.h"
|
||||||
XCODE_ATTRIBUTE_SWIFT_OBJC_INTERFACE_HEADER_NAME "eden-ios-Swift.h"
|
XCODE_ATTRIBUTE_SWIFT_OBJC_INTERFACE_HEADER_NAME "eden-ios-Swift.h"
|
||||||
XCODE_ATTRIBUTE_DERIVED_FILE_DIR "${CMAKE_CURRENT_BINARY_DIR}"
|
XCODE_ATTRIBUTE_DERIVED_FILE_DIR "${CMAKE_CURRENT_BINARY_DIR}")
|
||||||
)
|
|
||||||
target_link_libraries(eden-ios PRIVATE common core input_common frontend_common video_core sirit::sirit)
|
target_link_libraries(eden-ios PRIVATE common core input_common frontend_common video_core sirit::sirit)
|
||||||
target_link_libraries(eden-ios PRIVATE ${PLATFORM_LIBRARIES} Threads::Threads)
|
target_link_libraries(eden-ios PRIVATE ${PLATFORM_LIBRARIES} Threads::Threads)
|
||||||
target_link_libraries(eden-ios PRIVATE SDL2::SDL2 glad stb::headers)
|
target_link_libraries(eden-ios PRIVATE SDL2::SDL2 glad stb::headers)
|
||||||
create_target_directory_groups(eden-ios)
|
create_target_directory_groups(eden-ios)
|
||||||
|
|
||||||
|
# FIXME(crueter): This should /all/ be in a module of some kind!
|
||||||
|
|
||||||
|
# Xcode will automatically generate the Assets.car and icns file for us.
|
||||||
|
set(_dist "${CMAKE_SOURCE_DIR}/dist")
|
||||||
|
if (CMAKE_GENERATOR MATCHES "Xcode")
|
||||||
|
set(_icons "${_dist}/eden.icon")
|
||||||
|
|
||||||
|
set_target_properties(eden-ios PROPERTIES
|
||||||
|
XCODE_ATTRIBUTE_ASSETCATALOG_COMPILER_APPICON_NAME eden
|
||||||
|
MACOSX_BUNDLE_ICON_FILE eden
|
||||||
|
# Also force xcode to manage signing for us.
|
||||||
|
XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED ON
|
||||||
|
XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED ON
|
||||||
|
XCODE_ATTRIBUTE_CODE_SIGN_STYLE Automatic)
|
||||||
|
# Otherwise, we'll use our own.
|
||||||
|
else()
|
||||||
|
set(_icons "${_dist}/eden.icns" "${_dist}/Assets.car")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set_source_files_properties(${_icons} PROPERTIES
|
||||||
|
MACOSX_PACKAGE_LOCATION Resources)
|
||||||
|
target_sources(eden-ios PRIVATE ${_icons})
|
||||||
|
|
||||||
|
set_target_properties(eden-ios PROPERTIES MACOSX_BUNDLE TRUE)
|
||||||
|
|
||||||
|
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-ios PRIVATE ${MOLTENVK_LIBRARY})
|
||||||
|
|
|
||||||
|
|
@ -4,16 +4,16 @@
|
||||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
import SwiftUI
|
import SwiftUI
|
||||||
import Sudachi
|
//import AppUI
|
||||||
|
|
||||||
struct ContentView: View {
|
struct ContentView: View {
|
||||||
@State var core = Core(games: [], root: FileManager.default.urls(for: .documentDirectory, in: .userDomainMask)[0])
|
// @State var core = Core(games: [], root: FileManager.default.urls(for: .documentDirectory, in: .userDomainMask)[0])
|
||||||
var body: some View {
|
var body: some View {
|
||||||
HomeView(core: core).onAppear() {
|
// HomeView(core: core).onAppear() {
|
||||||
Air.play(AnyView(
|
// Air.play(AnyView(
|
||||||
Text("Select Game").font(.system(size: 100))
|
// Text("Select Game").font(.system(size: 100))
|
||||||
))
|
// ))
|
||||||
// rest of death
|
// // rest of death
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -369,7 +369,7 @@ if (APPLE)
|
||||||
if (CMAKE_GENERATOR MATCHES "Xcode")
|
if (CMAKE_GENERATOR MATCHES "Xcode")
|
||||||
set(_icons "${_dist}/eden.icon")
|
set(_icons "${_dist}/eden.icon")
|
||||||
|
|
||||||
set_target_properties(eden PROPERTIES
|
set_target_properties(yuzu PROPERTIES
|
||||||
XCODE_ATTRIBUTE_ASSETCATALOG_COMPILER_APPICON_NAME eden
|
XCODE_ATTRIBUTE_ASSETCATALOG_COMPILER_APPICON_NAME eden
|
||||||
MACOSX_BUNDLE_ICON_FILE eden
|
MACOSX_BUNDLE_ICON_FILE eden
|
||||||
# Also force xcode to manage signing for us.
|
# Also force xcode to manage signing for us.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue