From 0b3a6d8e8428082c9e76639275a39752f2538993 Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Tue, 8 Feb 2022 14:22:48 +0600 Subject: [PATCH 1/8] Qt is now on by default for non-Windows --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index e1f6fc47e..9170741cb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -122,7 +122,11 @@ option(CPPTHREADS "C++11 threads" option(NEW_DYNAREC "Use the PCem v15 (\"new\") dynamic recompiler" OFF) option(MINITRACE "Enable Chrome tracing using the modified minitrace library" OFF) option(DEV_BRANCH "Development branch" OFF) +if(NOT WIN32) +option(QT "QT GUI" ON) +else() option(QT "QT GUI" OFF) +endif() # Development branch features # From 2899185c05d0963003a222f5f415344877b192b8 Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Tue, 8 Feb 2022 14:44:36 +0600 Subject: [PATCH 2/8] Fix Linux GH builds --- .github/workflows/cmake.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 6ee6d6b43..915298da6 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -260,6 +260,7 @@ jobs: -D DEV_BRANCH=${{ matrix.build.dev-build }} -D NEW_DYNAREC=${{ matrix.build.new-dynarec }} -D VNC=OFF + -D QT=OFF -D CMAKE_BUILD_TYPE=${{ matrix.build.type }} -D CMAKE_C_COMPILER=gcc-11 -D CMAKE_CXX_COMPILER=g++-11 - name: Build From 6b4b4381956b7a960858f7574d17978eaf8b412b Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Tue, 8 Feb 2022 14:46:01 +0600 Subject: [PATCH 3/8] Fix macOS GH build --- .github/workflows/cmake.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 915298da6..216c1568d 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -317,7 +317,7 @@ jobs: steps: - uses: actions/checkout@v2 - name: Install dependencies - run: brew install freetype sdl2 libpng openal-soft rtmidi + run: brew install freetype sdl2 libpng openal-soft rtmidi qt@5 && brew link qt@5 - name: Configure CMake run: >- cmake -S . -B build From a343609bcaf6a251cdd8245c8e34c957771278d8 Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Tue, 8 Feb 2022 15:13:21 +0600 Subject: [PATCH 4/8] macOS GH builds use Qt6 --- .github/workflows/cmake.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 216c1568d..07c9c38db 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -317,7 +317,7 @@ jobs: steps: - uses: actions/checkout@v2 - name: Install dependencies - run: brew install freetype sdl2 libpng openal-soft rtmidi qt@5 && brew link qt@5 + run: brew install freetype sdl2 libpng openal-soft rtmidi qt - name: Configure CMake run: >- cmake -S . -B build @@ -326,6 +326,8 @@ jobs: -D NEW_DYNAREC=${{ matrix.build.new-dynarec }} -D VNC=OFF -D CMAKE_BUILD_TYPE=${{ matrix.build.type }} + -D QT=ON + -D USE_QT6=ON - name: Build run: cmake --build build - name: Generate package From f6a68e933aa535e161b6aa0a334a695cdd070855 Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Tue, 8 Feb 2022 15:43:17 +0600 Subject: [PATCH 5/8] Revert with fixes --- .github/workflows/cmake.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 07c9c38db..47cf9f71e 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -317,7 +317,7 @@ jobs: steps: - uses: actions/checkout@v2 - name: Install dependencies - run: brew install freetype sdl2 libpng openal-soft rtmidi qt + run: brew install freetype sdl2 libpng openal-soft rtmidi qt@5 - name: Configure CMake run: >- cmake -S . -B build @@ -327,7 +327,7 @@ jobs: -D VNC=OFF -D CMAKE_BUILD_TYPE=${{ matrix.build.type }} -D QT=ON - -D USE_QT6=ON + -D Qt5_DIR=/usr/local/opt/qt@5/lib/cmake/ - name: Build run: cmake --build build - name: Generate package From 6a425916eb44c6c04bb9568fa74375149b24aca2 Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Tue, 8 Feb 2022 15:54:17 +0600 Subject: [PATCH 6/8] Fix wrong Qt5_DIR variable --- .github/workflows/cmake.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 47cf9f71e..f1be35dee 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -327,7 +327,7 @@ jobs: -D VNC=OFF -D CMAKE_BUILD_TYPE=${{ matrix.build.type }} -D QT=ON - -D Qt5_DIR=/usr/local/opt/qt@5/lib/cmake/ + -D Qt5_DIR=/usr/local/opt/qt@5/lib/cmake/Qt5/ - name: Build run: cmake --build build - name: Generate package From 97a2efb5e8596c4b47612f6ef03dc14437438779 Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Tue, 8 Feb 2022 15:58:00 +0600 Subject: [PATCH 7/8] 2nd attempt --- .github/workflows/cmake.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index f1be35dee..348576e40 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -327,7 +327,7 @@ jobs: -D VNC=OFF -D CMAKE_BUILD_TYPE=${{ matrix.build.type }} -D QT=ON - -D Qt5_DIR=/usr/local/opt/qt@5/lib/cmake/Qt5/ + -D Qt5_DIR=/usr/local/Cellar/qt@5/5.15.2/lib/cmake/ - name: Build run: cmake --build build - name: Generate package From 1df33b4946e45d65b7aeadd13aabce6d0c7ebe78 Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Tue, 8 Feb 2022 16:26:41 +0600 Subject: [PATCH 8/8] Specify directory for Qt Linguist Tools in CMake --- .github/workflows/cmake.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 348576e40..1db23c823 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -328,6 +328,7 @@ jobs: -D CMAKE_BUILD_TYPE=${{ matrix.build.type }} -D QT=ON -D Qt5_DIR=/usr/local/Cellar/qt@5/5.15.2/lib/cmake/ + -D Qt5LinguistTools_DIR=/usr/local/Cellar/qt@5/5.15.2/lib/cmake/Qt5LinguistTools/ - name: Build run: cmake --build build - name: Generate package