Skip to content

Commit

Permalink
Merge pull request microsoft#61 from daschuer/add_arm64-osx
Browse files Browse the repository at this point in the history
Add arm64 osx
  • Loading branch information
Swiftb0y authored Mar 20, 2023
2 parents c9ebc36 + 9c7521d commit 50ff351
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 4 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,15 @@ jobs:
vcpkg_packages_extras: qt5-macextras
vcpkg_cache: /Users/runner/.cache/vcpkg/archives
check_disk_space: df -h
- os: macos-11
vcpkg_path: /Users/runner/mixxx-vcpkg
vcpkg_bootstrap: ./bootstrap-vcpkg.sh
vcpkg_triplet: arm64-osx-min1100
vcpkg_host_triplet: x64-osx-min1012
vcpkg_overlay_ports: overlay/osx:overlay/ports
vcpkg_packages_extras: qt5-macextras
vcpkg_cache: /Users/runner/.cache/vcpkg/archives
check_disk_space: df -h
env:
VCPKG_PACKAGES: >-
ableton
Expand Down Expand Up @@ -72,7 +81,7 @@ jobs:
DEPS_BASE_NAME: mixxx-deps
DEVELOPER_DIR: /Applications/Xcode_12.4.app/Contents/Developer
MIXXX_VERSION: 2.4
name: ${{ matrix.os }}
name: ${{ matrix.vcpkg_triplet }}
runs-on: ${{ matrix.os }}
steps:
- name: Check out git repository
Expand Down Expand Up @@ -119,7 +128,7 @@ jobs:
if: always()
uses: actions/upload-artifact@v3
with:
name: logs-${{ matrix.os }}
name: logs-${{ matrix.vcpkg_triplet }}
path: ${{ matrix.vcpkg_path }}/buildtrees/**/*.log

- name: Create buildenv archive
Expand Down
2 changes: 1 addition & 1 deletion overlay/osx/qt5-base/cmake/configure_qt.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ function(configure_qt)
string(REPLACE "${CMAKE_CURRENT_INSTALLED_DIR_PATH}" "\${CURRENT_INSTALLED_DIR}" _contents ${_contents})
#string(REPLACE "HostPrefix=\${CURRENT_PACKAGES_DIR}" "HostPrefix=\${CURRENT_INSTALLED_DIR}" _contents ${_contents})
string(REPLACE "[EffectivePaths]\nPrefix=..\n" "" _contents ${_contents})
string(REPLACE "[EffectiveSourcePaths]\nPrefix=${_csc_SOURCE_PATH}\n" "" _contents ${_contents})
string(REGEX REPLACE "\\[EffectiveSourcePaths\\]\r?\nPrefix=[^\r\n]+\r?\n" "" _contents ${_contents})
string(REPLACE "Sysroot=\n" "" _contents ${_contents})
string(REPLACE "SysrootifyPrefix=false\n" "" _contents ${_contents})
file(WRITE "${CURRENT_PACKAGES_DIR}/tools/qt5/qt_${_build_type_${_buildname}}.conf" "${_contents}")
Expand Down
10 changes: 10 additions & 0 deletions overlay/osx/qt5-base/cmake/find_qt_mkspec.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,16 @@ function(find_qt_mkspec TARGET_PLATFORM_MKSPEC_OUT HOST_PLATFORM_MKSPEC_OUT EXT_

## Figure out QTs host mkspec
if(NOT DEFINED VCPKG_QT_HOST_MKSPEC)
if(VCPKG_HOST_IS_OSX)
find_program(UNAME_EXECUTABLE uname /bin /usr/bin /usr/local/bin )
if(UNAME_EXECUTABLE)
exec_program(${UNAME_EXECUTABLE} ARGS -m OUTPUT_VARIABLE HOST_SYSTEM_PROCESSOR
RETURN_VALUE val)
if(HOST_SYSTEM_PROCESSOR MATCHES "arm64")
set(_tmp_host_out "macx-aarch64-clang")
endif()
endif()
endif()
#if(WIN32)
# set(_tmp_host_out "win32-msvc")
#elseif("${CMAKE_HOST_SYSTEM}" STREQUAL "Linux")
Expand Down
18 changes: 18 additions & 0 deletions overlay/osx/qt5-host-tools/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@

if (NOT ${VCPKG_CROSSCOMPILING})
# Qt installs the host tools to /home/sperry/workspace/vcpkg/installed/{HOST_TRIPLET}/tools/qt5
# and not to the ${CURRENT_PACKAGES_DIR}. This helper package creates the a valid package from these files
# at packages/qt5-host-tools_${TARGET_TRIPLET}
if (NOT EXISTS "${CURRENT_HOST_INSTALLED_DIR}/lib/pkgconfig/Qt5Core.pc")
message(STATUS "creating a package from ${CURRENT_HOST_INSTALLED_DIR}/tools/qt5")
file(COPY "${CURRENT_HOST_INSTALLED_DIR}/tools/qt5/" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/qt5/")
file(REMOVE_RECURSE "${CURRENT_HOST_INSTALLED_DIR}/tools/qt5")
endif()
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/include")
file(TOUCH "${CURRENT_PACKAGES_DIR}/include/qt5-host-tools")
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/share/qt5-host-tools")
file(TOUCH "${CURRENT_PACKAGES_DIR}/share/qt5-host-tools/copyright")
else()
# crosscompiling
message(FATAL_ERROR "qt5-host-tools can only be installed for the host")
endif()
6 changes: 6 additions & 0 deletions overlay/osx/qt5-host-tools/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name": "qt5-host-tools",
"version-string": "5.12.4",
"port-version": 2,
"description": "Export helper for Qt5 host tools"
}
6 changes: 5 additions & 1 deletion overlay/osx/qt5-tools/vcpkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
"name": "qt5-base",
"default-features": false
},
"qt5-declarative"
"qt5-declarative",
{
"name": "qt5-host-tools",
"host": true
}
]
}

0 comments on commit 50ff351

Please sign in to comment.