Skip to content

Commit 13cd31d

Browse files
committed
chore(CMakeLists.txt): reconfigure vcpkg triplets
1 parent cc7061a commit 13cd31d

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

CMakeLists.txt

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,19 @@ if(NOT DEFINED ${CMAKE_TOOLCHAIN_FILE})
44
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_CURRENT_SOURCE_DIR}/vcpkg/scripts/buildsystems/vcpkg.cmake CACHE STRING "Vcpkg toolchain file")
55
endif()
66

7+
option(VCPKG_ROOT_TRIPLET "Vcpkg triplet" OFF)
78
set(VCPKG_OVERLAY_TRIPLETS ${CMAKE_CURRENT_SOURCE_DIR}/triplets)
8-
if (WIN32)
9-
set(VCPKG_TARGET_TRIPLET x64-windows-mixed)
10-
set(VCPKG_HOST_TRIPLET x64-windows-mixed)
11-
elseif (UNIX)
12-
set(VCPKG_HOST_TRIPLET x64-linux-mixed)
13-
set(VCPKG_TARGET_TRIPLET x64-linux-mixed)
9+
if(NOT VCPKG_ROOT_TRIPLET)
10+
if (WIN32)
11+
set(VCPKG_HOST_TRIPLET x64-windows-mixed)
12+
set(VCPKG_TARGET_TRIPLET x64-windows-mixed)
13+
elseif (UNIX)
14+
set(VCPKG_HOST_TRIPLET x64-linux-mixed)
15+
set(VCPKG_TARGET_TRIPLET x64-linux-mixed)
16+
endif()
17+
else()
18+
set(VCPKG_HOST_TRIPLET ${VCPKG_ROOT_TRIPLET})
19+
set(VCPKG_TARGET_TRIPLET ${VCPKG_ROOT_TRIPLET})
1420
endif()
1521

1622
project(qSQLbrowser)

0 commit comments

Comments
 (0)