diff --git a/.github/workflows/macos_build.yml b/.github/workflows/macos_build.yml index a6d327c9..3be013a7 100644 --- a/.github/workflows/macos_build.yml +++ b/.github/workflows/macos_build.yml @@ -10,10 +10,8 @@ on: - ready_for_review env: - VULKAN_SDK_VERSION: '1.3.250.1' - VULKAN_LIB_VERSION: '1.3.250' MACOSX_DEPLOYMENT_TARGET: '10.15' - GH_CACHE_KEY: 10 + GH_CACHE_KEY: 1 jobs: build: @@ -32,28 +30,14 @@ jobs: - name: install libs run: | brew install ninja yasm dylibbundler \ - libvpx boost meson cmake zlib \ + libvpx boost cmake zlib \ sdl2 sdl2_image sdl2_mixer sdl2_net - uses: actions/cache@v4 id: cache with: path: | - vulkansdk-macos.dmg ffmpeg - key: MacOS-${{ env.VULKAN_SDK_VERSION }}-${{ env.GH_CACHE_KEY }} - - name: download Vulkan SDK - if: steps.cache.outputs.cache-hit != 'true' - run: | - wget https://sdk.lunarg.com/sdk/download/${{ env.VULKAN_SDK_VERSION }}/mac/vulkansdk-macos-${{ env.VULKAN_SDK_VERSION }}.dmg?Human=true -O vulkansdk-macos.dmg - - name: install Vulkan SDK - run: | - hdiutil attach vulkansdk-macos.dmg - sudo /Volumes/VulkanSDK/InstallVulkan.app/Contents/MacOS/InstallVulkan --root ~/VulkanSDK --accept-licenses --default-answer --confirm-command install - sync - cd ~/VulkanSDK/ - sudo ./install_vulkan.py - sleep 10 - hdiutil detach /Volumes/VulkanSDK + key: MacOS-${{ env.GH_CACHE_KEY }} - name: ffmpeg -- download if: steps.cache.outputs.cache-hit != 'true' run: git clone --depth 1 --branch n6.1 https://git.ffmpeg.org/ffmpeg.git ffmpeg @@ -94,7 +78,7 @@ jobs: - name: perimeter -- create build dir run: mkdir build - name: perimeter -- configure - run: cmake .. -G Ninja -DCMAKE_BUILD_TYPE=${{matrix.env.build_type}} ${{matrix.env.cmake}} + run: cmake .. -G Ninja -DCMAKE_BUILD_TYPE=${{matrix.env.build_type}} -DOPTION_D3D9=OFF ${{matrix.env.cmake}} working-directory: build - name: perimeter -- build project run: ninja @@ -104,11 +88,8 @@ jobs: working-directory: build - name: perimeter -- strip run: | - if [[ -d output/lib ]]; then - strip -x output/lib/* - fi - strip -x output/bin/* - working-directory: build + strip -x perimeter.app/Contents/MacOS/* + working-directory: . #TODO update package.sh to handle cmake install result #- name: perimeter -- package app # run: macos/package.sh diff --git a/Source/Game/CMakeLists.txt b/Source/Game/CMakeLists.txt index 8ee4809d..c63c0fa1 100644 --- a/Source/Game/CMakeLists.txt +++ b/Source/Game/CMakeLists.txt @@ -172,13 +172,11 @@ IF(APPLE) SET_TARGET_PROPERTIES(perimeter PROPERTIES MACOSX_BUNDLE TRUE MACOSX_BUNDLE_INFO_PLIST "${PROJECT_SOURCE_DIR}/macos/DebugInfo.plist" - BUNDLE DESTINATION ${CMAKE_SOURCE_DIR} ) ELSE() SET_TARGET_PROPERTIES(perimeter PROPERTIES MACOSX_BUNDLE TRUE MACOSX_BUNDLE_INFO_PLIST "${PROJECT_SOURCE_DIR}/macos/Perimeter.app.template/Contents/Info.plist" - BUNDLE DESTINATION ${CMAKE_SOURCE_DIR} ) ENDIF() ENDIF() @@ -187,4 +185,8 @@ ENDIF() target_link_libraries(perimeter PRIVATE ${perimeter_LINK_LIBS}) #Install rules -install (TARGETS perimeter RUNTIME) +install (TARGETS perimeter + RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX} + LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX} + BUNDLE DESTINATION ${CMAKE_INSTALL_PREFIX} +)