Skip to content

Commit 60df33a

Browse files
committed
set target not default triplet
1 parent 5299661 commit 60df33a

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

.github/workflows/cmake-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ jobs:
6969
env:
7070
CXX: ${{ matrix.compiler }}
7171
# HACK: -static makes windows work right now
72-
VCPKG_DEFAULT_TRIPLET: ${{ matrix.target-cpu }}-${{ matrix.target-os }}${{ case ( matrix.os == 'windows', '-static', '' ) }}
72+
VCPKG_TARGET_TRIPLET: ${{ matrix.target-cpu }}-${{ matrix.target-os }}${{ case ( matrix.os == 'windows', '-static', '' ) }}
7373
VCPKG_DISABLE_METRICS: true
7474
VCPKG_ROOT: ${{ github.workspace }}/vcpkg
7575
VCPKG_DEFAULT_BINARY_CACHE: ${{ github.workspace }}/vcpkg/.cache

CMakeLists.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,18 @@ endif()
1313
if(NOT VCPKG_ROOT)
1414
set(VCPKG_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/vcpkg")
1515
endif()
16+
# if(NOT VCPKG_DEFAULT_TRIPLET)
17+
# set(VCPKG_DEFAULT_TRIPLET $ENV{VCPKG_DEFAULT_TRIPLET})
18+
# endif()
19+
message("VCPKG_TARGET_TRIPLET = ${VCPKG_TARGET_TRIPLET}")
20+
if(NOT VCPKG_TARGET_TRIPLET)
21+
set(VCPKG_TARGET_TRIPLET $ENV{VCPKG_TARGET_TRIPLET})
22+
endif()
23+
message("VCPKG_TARGET_TRIPLET = ${VCPKG_TARGET_TRIPLET}")
24+
# if(NOT VCPKG_TARGET_TRIPLET)
25+
# set(VCPKG_TARGET_TRIPLET ${VCPKG_DEFAULT_TRIPLET})
26+
# endif()
27+
message("VCPKG_DEFAULT_TRIPLET = ${VCPKG_DEFAULT_TRIPLET}")
1628
if (NOT APPLE)
1729
set(VCPKG_CRT_LINKAGE static)
1830
set(VCPKG_LIBRARY_LINKAGE static)

0 commit comments

Comments
 (0)