From b0e97b229eab3ba106fcceba17621267c999ba08 Mon Sep 17 00:00:00 2001 From: Nadia Holmquist Pedersen Date: Sun, 2 May 2021 14:34:44 +0200 Subject: Fix minimum Darwin version for targeting 10.15 --- src/frontend/qt_sdl/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/frontend/qt_sdl/CMakeLists.txt b/src/frontend/qt_sdl/CMakeLists.txt index c2e53c4..66c2f4d 100644 --- a/src/frontend/qt_sdl/CMakeLists.txt +++ b/src/frontend/qt_sdl/CMakeLists.txt @@ -136,7 +136,7 @@ if (APPLE) 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 - if(CMAKE_SYSTEM_VERSION VERSION_GREATER 18.5.0) + if(CMAKE_SYSTEM_VERSION VERSION_GREATER_EQUAL 19.0.0) if (USE_QT6) set(CMAKE_OSX_DEPLOYMENT_TARGET "10.15" CACHE STRING "Minimum OS X deployment version" FORCE) endif() -- cgit v1.2.3 From 1004ff7fb3800344e5a97317277c3bdb1af4bf5d Mon Sep 17 00:00:00 2001 From: Nadia Holmquist Pedersen Date: Sun, 2 May 2021 14:51:11 +0200 Subject: Remove cp -r of mac build in readme --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 8ae56fe..989ddad 100644 --- a/README.md +++ b/README.md @@ -99,9 +99,8 @@ If everything went well, melonDS should now be in the `dist` folder. ```zsh cmake .. -DCMAKE_PREFIX_PATH="$(brew --prefix qt@5);$(brew --prefix libarchive)" -DMACOS_BUNDLE_LIBS=ON 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 -- cgit v1.2.3 From 6a655447d4c45d600793ba2d0872787d56645121 Mon Sep 17 00:00:00 2001 From: WaluigiWare64 <68647953+WaluigiWare64@users.noreply.github.com> Date: Sun, 2 May 2021 12:53:34 +0000 Subject: Update README instructions to use Qt 6 on macOS --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 989ddad..943e8c6 100644 --- a/README.md +++ b/README.md @@ -88,7 +88,7 @@ If everything went well, melonDS should now be in the `dist` folder. ### macOS: 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: ```zsh git clone https://github.com/Arisotura/melonDS @@ -97,7 +97,7 @@ If everything went well, melonDS should now be in the `dist` folder. ``` 4. Compile: ```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)" -DMACOS_BUNDLE_LIBS=ON make -j$(sysctl -n hw.logicalcpu) ``` If everything went well, melonDS.app should now be in the curent directory. -- cgit v1.2.3 From 63415f0eeb1d4a52e15f1c6bf90cebd4eb88bdc9 Mon Sep 17 00:00:00 2001 From: WaluigiWare64 <68647953+WaluigiWare64@users.noreply.github.com> Date: Sun, 2 May 2021 13:13:43 +0000 Subject: Add -DUSE_QT6=ON to README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 943e8c6..73d0c4f 100644 --- a/README.md +++ b/README.md @@ -97,7 +97,7 @@ If everything went well, melonDS should now be in the `dist` folder. ``` 4. Compile: ```zsh - cmake .. -DCMAKE_PREFIX_PATH="$(brew --prefix qt@6);$(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) ``` If everything went well, melonDS.app should now be in the curent directory. -- cgit v1.2.3 From d6036f92254b53b67c0b32c9b02f9d6575f1953f Mon Sep 17 00:00:00 2001 From: Nadia Holmquist Pedersen Date: Sun, 2 May 2021 16:29:48 +0200 Subject: macOS-related CMake cleanups * Remove useless explicitly specified link/include directories * Don't pass -s or -pie to the linker as they aren't needed --- CMakeLists.txt | 6 ++++-- src/CMakeLists.txt | 5 ----- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0c18164..66d0461 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -87,7 +87,9 @@ endif() if (CMAKE_BUILD_TYPE STREQUAL Release) add_compile_options(-O3) - add_link_options(-s) + if (NOT APPLE) + add_link_options(-s) + endif() endif() if (WIN32) @@ -99,7 +101,7 @@ if (BUILD_STATIC AND WIN32) endif() if (ENABLE_LTO) - if (WIN32) + if (WIN32 OR APPLE) add_compile_options(-flto) add_link_options(-flto) else() diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index dc32b2a..c899745 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -100,11 +100,6 @@ if (ENABLE_JIT) 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) find_package(PkgConfig REQUIRED) pkg_check_modules(EPOXY REQUIRED epoxy) -- cgit v1.2.3 From 464897ea87f5242f4769bef36120c88ec4dbcd6c Mon Sep 17 00:00:00 2001 From: Nadia Holmquist Pedersen Date: Sun, 2 May 2021 16:39:02 +0200 Subject: Explicitly include ${SDL2_PREFIX}/include this only accidentally worked before --- src/frontend/qt_sdl/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/frontend/qt_sdl/CMakeLists.txt b/src/frontend/qt_sdl/CMakeLists.txt index 66c2f4d..05dce4a 100644 --- a/src/frontend/qt_sdl/CMakeLists.txt +++ b/src/frontend/qt_sdl/CMakeLists.txt @@ -82,7 +82,7 @@ endif() 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 ${LIBARCHIVE_LIBRARY_DIRS}) -- cgit v1.2.3