Skip to content

Commit a41028f

Browse files
authored
Update following USVFS move to VCPKG. (#2244)
1 parent eddc30a commit a41028f

File tree

10 files changed

+474
-372
lines changed

10 files changed

+474
-372
lines changed

.github/workflows/build.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,26 @@ on:
66
pull_request:
77
types: [opened, synchronize, reopened]
88

9+
env:
10+
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
11+
912
jobs:
1013
build:
1114
runs-on: windows-2022
1215
steps:
16+
# https://learn.microsoft.com/en-us/vcpkg/consume/binary-caching-github-actions-cache
17+
- name: Export GitHub Actions cache environment variables
18+
uses: actions/github-script@v7
19+
with:
20+
script: |
21+
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
22+
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
23+
24+
- name: "Set environmental variables"
25+
shell: bash
26+
run: |
27+
echo "VCPKG_ROOT=$VCPKG_INSTALLATION_ROOT" >> $GITHUB_ENV
28+
1329
- name: Build ModOrganizer 2
1430
uses: ModOrganizer2/build-with-mob-action@master
1531
with:

src/CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
cmake_minimum_required(VERSION 3.16)
22

3+
find_package(usvfs CONFIG REQUIRED)
4+
35
add_executable(organizer)
46
set_target_properties(organizer PROPERTIES OUTPUT_NAME "ModOrganizer")
57
mo2_configure_executable(organizer
68
WARNINGS OFF
79
EXTRA_TRANSLATIONS ${MO2_SUPER_PATH}/game_gamebryo/src ${MO2_UIBASE_PATH}/src
810
PRIVATE_DEPENDS
9-
uibase githubpp bsatk esptk archive usvfs lootcli boost::program_options
11+
uibase githubpp bsatk esptk archive lootcli boost::program_options
1012
DirectXTex libbsarch Qt::WebEngineWidgets Qt::WebSockets)
11-
target_link_libraries(organizer PUBLIC Shlwapi)
13+
target_link_libraries(organizer PUBLIC usvfs::usvfs Shlwapi)
1214
target_include_directories(organizer PUBLIC ${DDS_ROOT})
1315
mo2_install_target(organizer)
1416

src/mainwindow.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
7676
#include <safewritefile.h>
7777
#include <scopeguard.h>
7878
#include <taskprogressmanager.h>
79-
#include <usvfs.h>
79+
#include <usvfs/usvfs.h>
8080
#include <utility.h>
8181

8282
#include "directoryrefresher.h"

0 commit comments

Comments
 (0)