Merge branch 'master' of https://github.com/Arisotura/melonDS
This commit is contained in:
commit
cc36f55b8c
|
@ -87,8 +87,10 @@ endif()
|
||||||
|
|
||||||
if (CMAKE_BUILD_TYPE STREQUAL Release)
|
if (CMAKE_BUILD_TYPE STREQUAL Release)
|
||||||
add_compile_options(-O3)
|
add_compile_options(-O3)
|
||||||
|
if (NOT APPLE)
|
||||||
add_link_options(-s)
|
add_link_options(-s)
|
||||||
endif()
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
option(BUILD_STATIC "Statically link dependencies" OFF)
|
option(BUILD_STATIC "Statically link dependencies" OFF)
|
||||||
|
@ -99,7 +101,7 @@ if (BUILD_STATIC AND WIN32)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (ENABLE_LTO)
|
if (ENABLE_LTO)
|
||||||
if (WIN32)
|
if (WIN32 OR APPLE)
|
||||||
add_compile_options(-flto)
|
add_compile_options(-flto)
|
||||||
add_link_options(-flto)
|
add_link_options(-flto)
|
||||||
else()
|
else()
|
||||||
|
|
|
@ -88,7 +88,7 @@ If everything went well, melonDS should now be in the `dist` folder.
|
||||||
|
|
||||||
### macOS:
|
### macOS:
|
||||||
1. Install the [Homebrew Package Manager](https://brew.sh)
|
1. Install the [Homebrew Package Manager](https://brew.sh)
|
||||||
2. Install dependencies: `brew install git pkg-config cmake sdl2 qt@5 libslirp libarchive libepoxy`
|
2. Install dependencies: `brew install git pkg-config cmake sdl2 qt@6 libslirp libarchive libepoxy`
|
||||||
3. Download the melonDS repository and prepare:
|
3. Download the melonDS repository and prepare:
|
||||||
```zsh
|
```zsh
|
||||||
git clone https://github.com/Arisotura/melonDS
|
git clone https://github.com/Arisotura/melonDS
|
||||||
|
@ -97,11 +97,10 @@ If everything went well, melonDS should now be in the `dist` folder.
|
||||||
```
|
```
|
||||||
4. Compile:
|
4. Compile:
|
||||||
```zsh
|
```zsh
|
||||||
cmake .. -DCMAKE_PREFIX_PATH="$(brew --prefix qt@5);$(brew --prefix libarchive)" -DMACOS_BUNDLE_LIBS=ON
|
cmake .. -DCMAKE_PREFIX_PATH="$(brew --prefix qt@6);$(brew --prefix libarchive)" -DUSE_QT6=ON -DMACOS_BUNDLE_LIBS=ON
|
||||||
make -j$(sysctl -n hw.logicalcpu)
|
make -j$(sysctl -n hw.logicalcpu)
|
||||||
mkdir dist && cp -r melonDS.app dist
|
|
||||||
```
|
```
|
||||||
If everything went well, melonDS.app should now be in the `dist` folder.
|
If everything went well, melonDS.app should now be in the curent directory.
|
||||||
|
|
||||||
|
|
||||||
## TODO LIST
|
## TODO LIST
|
||||||
|
|
|
@ -100,11 +100,6 @@ if (ENABLE_JIT)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (APPLE)
|
|
||||||
target_include_directories(core PUBLIC /usr/local/include /opt/homebrew/include)
|
|
||||||
target_link_directories(core PUBLIC /usr/local/lib /opt/homebrew/lib)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (ENABLE_OGLRENDERER)
|
if (ENABLE_OGLRENDERER)
|
||||||
find_package(PkgConfig REQUIRED)
|
find_package(PkgConfig REQUIRED)
|
||||||
pkg_check_modules(EPOXY REQUIRED epoxy)
|
pkg_check_modules(EPOXY REQUIRED epoxy)
|
||||||
|
|
|
@ -82,7 +82,7 @@ endif()
|
||||||
|
|
||||||
target_link_libraries(melonDS ${CMAKE_THREAD_LIBS_INIT})
|
target_link_libraries(melonDS ${CMAKE_THREAD_LIBS_INIT})
|
||||||
|
|
||||||
target_include_directories(melonDS PRIVATE ${SDL2_INCLUDE_DIRS} ${SLIRP_INCLUDE_DIRS} ${LIBARCHIVE_INCLUDE_DIRS})
|
target_include_directories(melonDS PRIVATE ${SDL2_INCLUDE_DIRS} ${SDL2_PREFIX}/include ${SLIRP_INCLUDE_DIRS} ${LIBARCHIVE_INCLUDE_DIRS})
|
||||||
target_link_directories(melonDS PRIVATE ${SDL2_LIBRARY_DIRS} ${SLIRP_LIBRARY_DIRS})
|
target_link_directories(melonDS PRIVATE ${SDL2_LIBRARY_DIRS} ${SLIRP_LIBRARY_DIRS})
|
||||||
target_link_directories(melonDS PRIVATE ${LIBARCHIVE_LIBRARY_DIRS})
|
target_link_directories(melonDS PRIVATE ${LIBARCHIVE_LIBRARY_DIRS})
|
||||||
|
|
||||||
|
@ -136,7 +136,7 @@ if (APPLE)
|
||||||
set_source_files_properties("${CMAKE_SOURCE_DIR}/melon.icns" PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
|
set_source_files_properties("${CMAKE_SOURCE_DIR}/melon.icns" PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
|
||||||
|
|
||||||
# Qt 6 requires macOS 10.15 if building on 10.15 or greater
|
# Qt 6 requires macOS 10.15 if building on 10.15 or greater
|
||||||
if(CMAKE_SYSTEM_VERSION VERSION_GREATER 18.5.0)
|
if(CMAKE_SYSTEM_VERSION VERSION_GREATER_EQUAL 19.0.0)
|
||||||
if (USE_QT6)
|
if (USE_QT6)
|
||||||
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.15" CACHE STRING "Minimum OS X deployment version" FORCE)
|
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.15" CACHE STRING "Minimum OS X deployment version" FORCE)
|
||||||
endif()
|
endif()
|
||||||
|
|
Loading…
Reference in New Issue