Skip to content

Commit

Permalink
Work on CI builds
Browse files Browse the repository at this point in the history
  • Loading branch information
emericg committed Nov 9, 2024
1 parent 8b1d1e3 commit 03f8bf5
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 14 deletions.
1 change: 1 addition & 0 deletions .github/workflows/builds_desktop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ jobs:
- name: Install dependencies (from package manager)
run: |
sudo apt-get install libgl1-mesa-dev libxkbcommon-x11-dev libx11-xcb-dev libzstd-dev -y;
sudo apt-get install cmake ninja-build pkgconf libtool -y;
sudo apt-get install appstream -y;
# Setup env
Expand Down
29 changes: 25 additions & 4 deletions .github/workflows/builds_mobile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,20 @@ jobs:
# Build application
- name: Build application
run: |
qmake ${{env.APP_NAME}}.pro CONFIG+=release
make -j$(nproc)
${{env.QT_TARGET_PATH}}/bin/qt-cmake --version
${{env.QT_TARGET_PATH}}/bin/qt-cmake -B build/ -G Ninja \
-DCMAKE_SYSTEM_NAME=Android \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_FIND_ROOT_PATH:PATH=${{env.QT_TARGET_PATH}} \
-DCMAKE_PREFIX_PATH:PATH=${{env.QT_TARGET_PATH}} \
-DANDROID_SDK_ROOT=$ANDROID_SDK_ROOT \
-DANDROID_NDK_ROOT=$ANDROID_NDK_ROOT \
-DANDROID_PLATFORM=android-23 \
-DANDROID_ABI="arm64-v8a" \
-DQT_HOST_PATH:PATH=${{env.QT_HOST_PATH}} \
-DQT_ANDROID_BUILD_ALL_ABIS=OFF \
-DQT_ANDROID_ABIS="arm64-v8a"
cmake --build build/ --config Release
## iOS build #################################################################
build-ios:
Expand Down Expand Up @@ -107,5 +119,14 @@ jobs:
# Build application
- name: Build application
run: |
qmake ${{env.APP_NAME}}.pro CONFIG+=release
make -j`sysctl -n hw.logicalcpu`
${{env.QT_TARGET_PATH}}/bin/qt-cmake --version
${{env.QT_TARGET_PATH}}/bin/qt-cmake -B build/ -G Xcode \
-DCMAKE_SYSTEM_NAME=iOS \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_FIND_ROOT_PATH:PATH=${{env.QT_TARGET_PATH}} \
-DCMAKE_PREFIX_PATH:PATH=${{env.QT_TARGET_PATH}} \
-DQT_HOST_PATH:PATH=${{env.QT_HOST_PATH}} \
-DENABLE_ARC=FALSE \
-DPLATFORM=OS64 \
-DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED="NO" \
cmake --build build/ --config Release
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ add_subdirectory(thirdparty/SingleApplication)
target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE SingleApplication)

# AppUtils
set(UTILS_DOCK_ENABLED true)
add_subdirectory(thirdparty/AppUtils)
target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE AppUtils)

Expand Down
15 changes: 5 additions & 10 deletions thirdparty/SunAndMoon/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,22 +1,16 @@
cmake_minimum_required(VERSION 3.20)

project(SunAndMoon LANGUAGES CXX)

set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_AUTOMOC ON)

################################################################################

if(NOT QT_DEFAULT_MAJOR_VERSION)
set(QT_DEFAULT_MAJOR_VERSION 6 CACHE STRING "Qt version to use (5 or 6), defaults to 6")
endif()

# Generic dependencies
set(CORE_COMPONENTS Core Gui Qml)
find_package(Qt${QT_DEFAULT_MAJOR_VERSION} REQUIRED COMPONENTS ${CORE_COMPONENTS})
find_package(Qt6 REQUIRED COMPONENTS ${CORE_COMPONENTS})


set(CORE_LIBRARIES Qt::Core Qt::Gui Qt::Qml)
set(CORE_LIBRARIES Qt::Core)

# Generic sources
set(CORE_SOURCES
Expand All @@ -35,5 +29,6 @@ set(CORE_SOURCES
add_library(SunAndMoon OBJECT ${CORE_SOURCES})
add_library(SunAndMoon::SunAndMoon ALIAS SunAndMoon)

target_compile_definitions(SunAndMoon PRIVATE _USE_MATH_DEFINES)
target_link_libraries(SunAndMoon PRIVATE ${CORE_LIBRARIES})
target_include_directories(SunAndMoon PUBLIC ${CMAKE_CURRENT_LIST_DIR})

0 comments on commit 03f8bf5

Please sign in to comment.