mirror of
https://github.com/itay-grudev/SingleApplication.git
synced 2025-01-15 08:52:08 +08:00
commit
3dd0c6dfbd
21
.github/workflows/build-cmake.yml
vendored
21
.github/workflows/build-cmake.yml
vendored
@ -7,10 +7,21 @@ jobs:
|
|||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
qt_version: [5.12.6, 5.13.2, 5.14.0, 5.15.0]
|
qt_version: [5.12.6, 5.13.2, 5.14.0, 5.15.0, 6.0.0]
|
||||||
platform: [ubuntu-latest, windows-latest, macos-latest]
|
platform: [ubuntu-latest, windows-latest, macos-latest]
|
||||||
|
include:
|
||||||
|
- qt_version: 6.0.0
|
||||||
|
additional_arguments: -D QT_DEFAULT_MAJOR_VERSION=6
|
||||||
|
- platform: ubuntu-latest
|
||||||
|
CXXFLAGS: -Wall -Wextra -pedantic -Werror
|
||||||
|
- platform: macos-latest
|
||||||
|
CXXFLAGS: -Wall -Wextra -pedantic -Werror
|
||||||
|
- platform: windows-latest
|
||||||
|
CXXFLAGS: /W4 /WX
|
||||||
|
|
||||||
runs-on: ${{ matrix.platform }}
|
runs-on: ${{ matrix.platform }}
|
||||||
|
env:
|
||||||
|
CXXFLAGS: ${{ matrix.CXXFLAGS }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
@ -21,7 +32,7 @@ jobs:
|
|||||||
version: ${{ matrix.qt_version }}
|
version: ${{ matrix.qt_version }}
|
||||||
|
|
||||||
- name: cmake
|
- name: cmake
|
||||||
run: cmake .
|
run: cmake . ${{ matrix.additional_arguments }}
|
||||||
|
|
||||||
- name: cmake build
|
- name: cmake build
|
||||||
run: cmake --build .
|
run: cmake --build .
|
||||||
@ -29,17 +40,17 @@ jobs:
|
|||||||
- name: Build example - basic (cmake)
|
- name: Build example - basic (cmake)
|
||||||
working-directory: examples/basic/
|
working-directory: examples/basic/
|
||||||
run: |
|
run: |
|
||||||
cmake .
|
cmake . ${{ matrix.additional_arguments }}
|
||||||
cmake --build .
|
cmake --build .
|
||||||
|
|
||||||
- name: Build example - calculator (cmake)
|
- name: Build example - calculator (cmake)
|
||||||
working-directory: examples/calculator/
|
working-directory: examples/calculator/
|
||||||
run: |
|
run: |
|
||||||
cmake .
|
cmake . ${{ matrix.additional_arguments }}
|
||||||
cmake --build .
|
cmake --build .
|
||||||
|
|
||||||
- name: Build example - sending_arguments (cmake)
|
- name: Build example - sending_arguments (cmake)
|
||||||
working-directory: examples/sending_arguments/
|
working-directory: examples/sending_arguments/
|
||||||
run: |
|
run: |
|
||||||
cmake .
|
cmake . ${{ matrix.additional_arguments }}
|
||||||
cmake --build .
|
cmake --build .
|
||||||
|
@ -4,10 +4,9 @@ project(basic LANGUAGES CXX)
|
|||||||
|
|
||||||
# SingleApplication base class
|
# SingleApplication base class
|
||||||
set(QAPPLICATION_CLASS QCoreApplication)
|
set(QAPPLICATION_CLASS QCoreApplication)
|
||||||
|
add_subdirectory(../.. SingleApplication)
|
||||||
|
|
||||||
add_executable(basic main.cpp)
|
add_executable(basic main.cpp)
|
||||||
|
|
||||||
find_package(Qt5 COMPONENTS Core REQUIRED)
|
|
||||||
add_subdirectory(../.. SingleApplication)
|
|
||||||
target_link_libraries(${PROJECT_NAME} SingleApplication::SingleApplication)
|
target_link_libraries(${PROJECT_NAME} SingleApplication::SingleApplication)
|
||||||
|
|
||||||
|
@ -6,6 +6,9 @@ set(CMAKE_AUTOMOC ON)
|
|||||||
|
|
||||||
# SingleApplication base class
|
# SingleApplication base class
|
||||||
set(QAPPLICATION_CLASS QApplication)
|
set(QAPPLICATION_CLASS QApplication)
|
||||||
|
add_subdirectory(../.. SingleApplication)
|
||||||
|
|
||||||
|
find_package(Qt${QT_DEFAULT_MAJOR_VERSION} COMPONENTS Core REQUIRED)
|
||||||
|
|
||||||
add_executable(${PROJECT_NAME}
|
add_executable(${PROJECT_NAME}
|
||||||
button.h
|
button.h
|
||||||
@ -15,6 +18,4 @@ add_executable(${PROJECT_NAME}
|
|||||||
main.cpp
|
main.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
find_package(Qt5 COMPONENTS Widgets REQUIRED)
|
|
||||||
add_subdirectory(../.. SingleApplication)
|
|
||||||
target_link_libraries(${PROJECT_NAME} SingleApplication::SingleApplication)
|
target_link_libraries(${PROJECT_NAME} SingleApplication::SingleApplication)
|
||||||
|
@ -6,6 +6,9 @@ set(CMAKE_AUTOMOC ON)
|
|||||||
|
|
||||||
# SingleApplication base class
|
# SingleApplication base class
|
||||||
set(QAPPLICATION_CLASS QCoreApplication)
|
set(QAPPLICATION_CLASS QCoreApplication)
|
||||||
|
add_subdirectory(../.. SingleApplication)
|
||||||
|
|
||||||
|
find_package(Qt${QT_DEFAULT_MAJOR_VERSION} COMPONENTS Core REQUIRED)
|
||||||
|
|
||||||
add_executable(${PROJECT_NAME}
|
add_executable(${PROJECT_NAME}
|
||||||
main.cpp
|
main.cpp
|
||||||
@ -14,6 +17,4 @@ add_executable(${PROJECT_NAME}
|
|||||||
main.cpp
|
main.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
find_package(Qt5 COMPONENTS Core REQUIRED)
|
|
||||||
add_subdirectory(../.. SingleApplication)
|
|
||||||
target_link_libraries(${PROJECT_NAME} SingleApplication::SingleApplication)
|
target_link_libraries(${PROJECT_NAME} SingleApplication::SingleApplication)
|
||||||
|
Loading…
Reference in New Issue
Block a user