Skip to content

Commit 4c8a1d9

Browse files
2 parents cf87d3d + 5ea5fe7 commit 4c8a1d9

2 files changed

Lines changed: 29 additions & 18 deletions

File tree

.github/workflows/main.yml

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,32 +11,39 @@ jobs:
1111
runs-on: macos-latest
1212

1313
steps:
14-
- name: 🧾 Checkout Repository
15-
uses: actions/checkout@v3
14+
- name: 🧷 Checkout Repository
15+
uses: actions/checkout@v4
1616

1717
- name: 📦 Install Qt with Multimedia
1818
uses: jurplel/install-qt-action@v4
1919
with:
20-
version: '6.5.2'
20+
version: '6.10'
2121
target: 'desktop'
2222
arch: 'clang_64'
2323
modules: 'qtmultimedia'
24-
- name: 🔍 Debug Qt install path
25-
run: echo "Qt installed at:$INSTALL_QT_DIR"
26-
27-
- name: 🧰 Configure CMake for Universal Build
24+
25+
- name: 🌐 Add Qt to PATH
26+
# Cette étape permet d'utiliser 'macdeployqt' directement sans le chemin complet
27+
run: echo "$QT_ROOT_DIR/bin" >> $GITHUB_PATH
28+
29+
- name: 🔍 Debug Installation Path
30+
run: |
31+
echo "Qt is installed at: $QT_ROOT_DIR"
32+
which macdeployqt
33+
34+
- name: 🛠️ Configure CMake for Universal Build
2835
run: |
29-
cmake -S . -B build \
36+
cmake -S ./src -B build \
3037
-DCMAKE_BUILD_TYPE=Release \
3138
-DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" \
32-
-DCMAKE_PREFIX_PATH="$HOME/Qt/6.5.2/macos"
39+
-DCMAKE_PREFIX_PATH="$QT_ROOT_DIR"
3340
3441
- name: 🏗️ Build Application
3542
run: cmake --build build --config Release
3643

3744
- name: 📦 Bundle Application with macdeployqt
3845
run: |
39-
"$INSTALL_QT_DIR/bin/macdeployqt" build/FastSoundSystem.app -verbose=2
46+
macdeployqt build/FastSoundSystem.app -verbose=2
4047
4148
- name: 🛫 Upload macOS App Bundle
4249
uses: actions/upload-artifact@v4

src/CMakeLists.txt

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
1616
set(WINDOWS_PLATFORM TRUE)
1717
elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
1818
set(MACOS_PLATFORM TRUE)
19+
# macOS-specific settings
20+
set(CMAKE_OSX_ARCHITECTURES "x86_64;arm64" CACHE STRING "Build for both Intel and Apple Silicon")
21+
set(CMAKE_OSX_SYSROOT "macosx11.0" CACHE STRING "Use Big Sur SDK")
22+
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.15" CACHE STRING "Minimum deployment target")
1923
elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
2024
set(LINUX_PLATFORM TRUE)
2125
endif()
@@ -68,7 +72,7 @@ if(${QT_VERSION_MAJOR} GREATER_EQUAL 6)
6872
target_link_libraries(FastSoundSystem PRIVATE Qt6::Multimedia)
6973
endif()
7074

71-
#
75+
# macOS bundle properties
7276
if(MACOS_PLATFORM)
7377
set_target_properties(FastSoundSystem PROPERTIES
7478
MACOSX_BUNDLE TRUE
@@ -78,12 +82,12 @@ if(MACOS_PLATFORM)
7882
)
7983
endif()
8084

81-
# Install
82-
install(TARGETS FastSoundSystem
83-
BUNDLE DESTINATION ./build # Install the .app bundle in the current directory
84-
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
85-
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
86-
)
85+
# Install (optional, handled by GitHub Actions)
86+
# install(TARGETS FastSoundSystem
87+
# BUNDLE DESTINATION ./build
88+
# LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
89+
# RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
90+
#)
8791

8892
# Exclude CPack DragNDrop generator (no .dmg file)
89-
set(CPACK_GENERATOR "") #
93+
set(CPACK_GENERATOR "")

0 commit comments

Comments
 (0)