diff --git a/.github/workflows/MacOSX.yml b/.github/workflows/MacOSX.yml index 999a385b9..6deeca1d6 100644 --- a/.github/workflows/MacOSX.yml +++ b/.github/workflows/MacOSX.yml @@ -31,24 +31,21 @@ jobs: uses: actions/cache@v2 with: path: build - key: ${{ runner.os }}-cmake-${{ github.sha }} - restore-keys: ${{ runner.os }}-cmake- + key: macos-cmake-${{ github.sha }} + restore-keys: macos-cmake- - name: Configure CMake # Use a bash shell so we can use the same syntax for environment variable # access regardless of the host operating system shell: bash - working-directory: ${{github.workspace}}/build - # Note the current convention is to use the -S and -B options here to specify source - # and build directories, but this is only available with CMake 3.13 and higher. - # The CMake binaries on the Github Actions machines are (as of this writing) 3.12 - run: cmake .. + working-directory: ${{github.workspace}} + run: cmake -S. -Bbuild - name: Build - working-directory: ${{github.workspace}}/build + working-directory: ${{github.workspace}} shell: bash # Execute the build. You can specify a specific target with "--target " - run: cmake --build . -j $(nproc) --target package + run: cmake --build build -j $(sysctl -n hw.physicalcpu) --target package - name: Release uses: softprops/action-gh-release@v1 diff --git a/CMakeLists.txt b/CMakeLists.txt index 525d1655e..6613c219c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -664,9 +664,9 @@ else() WIN32 MACOSX_BUNDLE Source/main.cpp - Source/devilutionx.exe.manifest - Packaging/macOS/AppIcon.icns - Packaging/windows/devilutionx.rc) + Packaging/windows/devilutionx.exe.manifest + Packaging/windows/devilutionx.rc + Packaging/apple/AppIcon.icns) endif() target_link_libraries(${BIN_TARGET} PRIVATE libdevilutionx) @@ -1154,7 +1154,7 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") endif() if(APPLE) - set_source_files_properties("./Packaging/macOS/AppIcon.icns" PROPERTIES MACOSX_PACKAGE_LOCATION Resources) + set_source_files_properties("./Packaging/apple/AppIcon.icns" PROPERTIES MACOSX_PACKAGE_LOCATION Resources) set(MACOSX_BUNDLE_GUI_IDENTIFIER com.diasurgical.devilutionx) set(MACOSX_BUNDLE_COPYRIGHT Unlicense) set(MACOSX_BUNDLE_BUNDLE_NAME devilutionx) @@ -1163,8 +1163,8 @@ if(APPLE) set(MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION}) set(MACOSX_BUNDLE_LONG_VERSION_STRING "Version ${PROJECT_VERSION}") set(CMAKE_OSX_DEPLOYMENT_TARGET "10.12.0") - set_target_properties(${BIN_TARGET} PROPERTIES MACOSX_BUNDLE_ICON_FILE "AppIcon") - set_target_properties(${BIN_TARGET} PROPERTIES MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/Packaging/macOS/Info.plist") + set_target_properties(${BIN_TARGET} PROPERTIES MACOSX_BUNDLE_ICON_FILE "AppIcon.icns") + set_target_properties(${BIN_TARGET} PROPERTIES MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/Packaging/apple/Info.plist") install (TARGETS ${BIN_TARGET} DESTINATION ./) diff --git a/Packaging/macOS/AppIcon.icns b/Packaging/apple/AppIcon.icns similarity index 100% rename from Packaging/macOS/AppIcon.icns rename to Packaging/apple/AppIcon.icns diff --git a/Packaging/macOS/Info.plist b/Packaging/apple/Info.plist similarity index 100% rename from Packaging/macOS/Info.plist rename to Packaging/apple/Info.plist diff --git a/Source/devilutionx.exe.manifest b/Packaging/windows/devilutionx.exe.manifest similarity index 100% rename from Source/devilutionx.exe.manifest rename to Packaging/windows/devilutionx.exe.manifest