manually fix prefix path

This commit is contained in:
Rick Vogel 2022-10-31 15:37:58 +01:00
parent 60d7b27333
commit 8b7f82d1c0
2 changed files with 5 additions and 12 deletions

View File

@ -29,7 +29,6 @@ jobs:
qtversion: "5.15.2",
qtdirkey: "Qt5_DIR",
qtdirvalue: "../Qt/5.15.2/msvc2019_64/lib/cmake/Qt5",
qtprefixdir: "../Qt/5.15.2/msvc2019_64",
},
}
- {
@ -47,7 +46,6 @@ jobs:
qtversion: "6.2.4",
qtdirkey: "Qt6_DIR",
qtdirvalue: "../Qt/6.2.4/msvc2019_64/lib/cmake/Qt6",
qtprefixdir: "../Qt/6.2.4/msvc2019_64",
},
}
- {
@ -65,7 +63,6 @@ jobs:
qtversion: "5.15.2",
qtdirkey: "Qt5_DIR",
qtdirvalue: "../Qt/5.15.2/msvc2019_64/lib/cmake/Qt5",
qtprefixdir: "../Qt/5.15.2/msvc2019_64",
},
}
- {
@ -83,7 +80,6 @@ jobs:
qtversion: "6.2.4",
qtdirkey: "Qt6_DIR",
qtdirvalue: "../Qt/6.2.4/msvc2019_64/lib/cmake/Qt6",
qtprefixdir: "../Qt/6.2.4/msvc2019_64",
},
}
- {
@ -100,7 +96,6 @@ jobs:
qtversion: "5.15.2",
qtdirkey: "Qt5_DIR",
qtdirvalue: "../Qt/5.15.2/gcc_64/lib/cmake/Qt5",
qtprefixdir: "../Qt/5.15.2/gcc_64",
},
}
- {
@ -117,7 +112,6 @@ jobs:
qtversion: "6.2.4",
qtdirkey: "Qt6_DIR",
qtdirvalue: "../Qt/6.2.4/gcc_64/lib/cmake/Qt6",
qtprefixdir: "../Qt/6.2.4/gcc_64",
},
}
- {
@ -134,7 +128,6 @@ jobs:
qtversion: "5.15.2",
qtdirkey: "Qt5_DIR",
qtdirvalue: "../Qt/5.15.2/gcc_64/lib/cmake/Qt5",
qtprefixdir: "../Qt/5.15.2/gcc_64",
},
}
- {
@ -151,7 +144,6 @@ jobs:
qtversion: "6.2.4",
qtdirkey: "Qt6_DIR",
qtdirvalue: "../Qt/6.2.4/gcc_64/lib/cmake/Qt6",
qtprefixdir: "../Qt/6.2.4/gcc_64",
},
}
- {
@ -168,7 +160,6 @@ jobs:
qtversion: "5.15.2",
qtdirkey: "Qt5_DIR",
qtdirvalue: "../Qt/5.15.2/clang_64/lib/cmake/Qt5",
qtprefixdir: "../Qt/5.15.2/clang_64",
},
}
- {
@ -185,7 +176,6 @@ jobs:
qtversion: "6.2.4",
qtdirkey: "Qt6_DIR",
qtdirvalue: "../Qt/6.2.4/clang_64/lib/cmake/Qt6",
qtprefixdir: "../Qt/6.2.4/clang_64",
},
}
@ -312,7 +302,6 @@ jobs:
-G "${{ matrix.config.generators }}" \
-DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} \
-DCMAKE_INSTALL_PREFIX:PATH=instdir \
-DCMAKE_PREFIX_PATH:PATH="${{ matrix.config.cmake.qtprefixdir }}" \
-D${{ matrix.config.cmake.qtdirkey }}:PATH="${{ matrix.config.cmake.qtdirvalue }}"
- name: Build
shell: bash

View File

@ -48,6 +48,10 @@ else()
set(Qt_VERSION_MINOR ${Qt5_VERSION_MINOR})
set(Qt_VERSION_PATCH ${Qt5_VERSION_PATCH})
elseif(NOT "${Qt6_DIR}" STREQUAL "")
string(REPLACE "/lib/cmake/Qt6" "" Qt6_PREFIX_DIR "${Qt6_DIR}")
set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} ${Qt6_PREFIX_DIR})
find_package(Qt6 REQUIRED COMPONENTS Core Gui OpenGL Quick QuickWidgets Svg Widgets)
find_package(Qt6 OPTIONAL_COMPONENTS QuickWidgets WebEngineCore WebEngineQuick)
set(Qt Qt${Qt6_VERSION_MAJOR})