CMake: Full macOS Support, macOS CI uses CMake
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Syping 2021-01-28 18:39:42 +01:00
parent 2f7e4a154d
commit fd5006e70f
3 changed files with 21 additions and 10 deletions

View file

@ -8,15 +8,16 @@ mkdir -p build && \
mkdir -p assets && \
cd build && \
/usr/local/opt/qt/bin/qmake \
${QMAKE_FLAGS_QT5} \
"${QMAKE_BUILD_TYPE}" \
"DEFINES+=GTA5SYNC_BUILDCODE=\\\\\\\"${PACKAGE_CODE}\\\\\\\"" \
"DEFINES+=GTA5SYNC_APPVER=\\\\\\\"${APPLICATION_VERSION}\\\\\\\"" \
"DEFINES+=GTA5SYNC_COMMIT=\\\\\\\"${APPLICATION_COMMIT}\\\\\\\"" \
"DEFINES+=GTA5SYNC_TELEMETRY" \
"DEFINES+=GTA5SYNC_TELEMETRY_WEBURL=\\\\\\\"https://dev.syping.de/gta5view-userstats/\\\\\\\"" \
../gta5view.pro && \
/usr/local/bin/cmake \
"-DCMAKE_PREFIX_PATH=/usr/local/opt/qt" \
"${CMAKE_BUILD_TYPE}" \
"-DFORCE_QT_VERSION=5" \
"-DGTA5VIEW_BUILDCODE=${PACKAGE_CODE}" \
"-DGTA5VIEW_APPVER=${APPLICATION_VERSION}" \
"-DGTA5VIEW_COMMIT=${APPLICATION_COMMIT}" \
"-DWITH_TELEMETRY=ON" \
"-DTELEMETRY_WEBURL=https://dev.syping.de/gta5view-userstats/" \
../ && \
make -j 4 && \
/usr/local/opt/qt/bin/macdeployqt gta5view.app -dmg && \
cp -Rf gta5view.dmg ../assets/gta5view-osx_${APPLICATION_VERSION}.dmg

View file

@ -1,4 +1,4 @@
#!/usr/bin/env bash
# Install packages
brew upgrade qt
brew upgrade cmake qt

View file

@ -34,6 +34,16 @@ if(WIN32)
res/app.rc
)
endif()
if(APPLE)
list(APPEND GTA5VIEW_RESOURCES
res/5sync.icns
)
set(MACOSX_BUNDLE_BUNDLE_NAME gta5view)
set(MACOSX_BUNDLE_BUNDLE_VERSION 1.10.0)
set(MACOSX_BUNDLE_ICON_FILE 5sync.icns)
set(MACOSX_BUNDLE_GUI_IDENTIFIER de.syping.gta5view)
set_source_files_properties(res/5sync.icns PROPERTIES MACOSX_PACKAGE_LOCATION "Resources")
endif()
list(APPEND GTA5VIEW_DEFINES
-DGTA5SYNC_CMAKE