Skip to content

Commit 9904bc4

Browse files
committed
Merge vcpkg-configuration.json into vcpkg.json and add standalone build.
1 parent 0212179 commit 9904bc4

File tree

5 files changed

+44
-39
lines changed

5 files changed

+44
-39
lines changed

.github/workflows/build-and-test.yml

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -34,28 +34,17 @@ jobs:
3434
cache: true
3535

3636
- uses: actions/checkout@v4
37-
- uses: lukka/run-vcpkg@v11
3837

39-
# build uibase
40-
- uses: actions/checkout@v4
41-
with:
42-
repository: ModOrganizer2/modorganizer-uibase
43-
ref: dev/vcpkg
44-
path: uibase
45-
46-
- name: Build UIBase
38+
- name: "Set environmental variables"
39+
shell: bash
4740
run: |
48-
cmake --preset vs2022-windows `
49-
"-DCMAKE_PREFIX_PATH=${env:QT_ROOT_DIR}\msvc2019_64" `
50-
"-DCMAKE_INSTALL_PREFIX=install"
51-
cmake --build vsbuild --config RelWithDebInfo --target INSTALL
52-
working-directory: uibase
41+
echo "VCPKG_ROOT=$VCPKG_INSTALLATION_ROOT" >> $GITHUB_ENV
5342
5443
- name: Configure Plugin Python build
5544
shell: pwsh
5645
run: |
57-
cmake --preset vs2022-windows `
58-
"-DCMAKE_PREFIX_PATH=${env:QT_ROOT_DIR}\msvc2019_64;${{ github.workspace }}\uibase\install\lib\cmake" `
46+
cmake --preset vs2022-windows-standalone `
47+
"-DCMAKE_PREFIX_PATH=${env:QT_ROOT_DIR}\msvc2019_64" `
5948
-DPLUGIN_PYTHON_TESTING=ON
6049
6150
- name: Build Plugin Python

CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@ cmake_policy(SET CMP0144 NEW)
44

55
project(plugin_python CXX)
66

7-
find_package(mo2-cmake CONFIG REQUIRED)
8-
7+
# find Python before include mo2-cmake, otherwise this will trigger a bunch of CMP0111
8+
# due to the imported configuration mapping variables defined in mo2.cmake
99
find_package(Python ${MO2_PYTHON_VERSION} COMPONENTS Interpreter Development REQUIRED)
1010
find_package(pybind11 CONFIG REQUIRED)
1111

12+
find_package(mo2-cmake CONFIG REQUIRED)
13+
1214
get_filename_component(Python_HOME ${Python_EXECUTABLE} PATH)
1315
set(Python_DLL_DIR "${Python_HOME}/DLLs")
1416
set(Python_LIB_DIR "${Python_HOME}/Lib")

CMakePresets.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,16 @@
5050
"inherits": ["cmake-dev", "vcpkg-dev"],
5151
"name": "vs2022-windows",
5252
"toolset": "v143"
53+
},
54+
{
55+
"cacheVariables": {
56+
"VCPKG_MANIFEST_FEATURES": {
57+
"type": "STRING",
58+
"value": "standalone;testing"
59+
}
60+
},
61+
"inherits": "vs2022-windows",
62+
"name": "vs2022-windows-standalone"
5363
}
5464
],
5565
"buildPresets": [

vcpkg-configuration.json

Lines changed: 0 additions & 21 deletions
This file was deleted.

vcpkg.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,31 @@
44
"testing": {
55
"description": "Build Plugin Python tests.",
66
"dependencies": ["gtest"]
7+
},
8+
"standalone": {
9+
"description": "Build Standalone.",
10+
"dependencies": ["mo2-uibase"]
711
}
12+
},
13+
"vcpkg-configuration": {
14+
"default-registry": {
15+
"kind": "git",
16+
"repository": "https://github.com/Microsoft/vcpkg",
17+
"baseline": "f61a294e765b257926ae9e9d85f96468a0af74e7"
18+
},
19+
"registries": [
20+
{
21+
"kind": "git",
22+
"repository": "https://github.com/Microsoft/vcpkg",
23+
"baseline": "f61a294e765b257926ae9e9d85f96468a0af74e7",
24+
"packages": ["boost*", "boost-*"]
25+
},
26+
{
27+
"kind": "git",
28+
"repository": "https://github.com/ModOrganizer2/vcpkg-registry",
29+
"baseline": "70c0aacd6962073dae6e46c2e810c91aa755d2e2",
30+
"packages": ["mo2-*", "pybind11", "spdlog"]
31+
}
32+
]
833
}
934
}

0 commit comments

Comments
 (0)