@@ -13,27 +13,26 @@ endif()
1313if (NOT VCPKG_ROOT)
1414 set (VCPKG_ROOT "${CMAKE_CURRENT_SOURCE_DIR} /vcpkg" )
1515endif ()
16- # if (LINUX)
17- # set(VCPKG_CRT_LINKAGE static)
18- # set(VCPKG_LIBRARY_LINKAGE static)
19- # else()
20- # set(VCPKG_CRT_LINKAGE dynamic)
21- # set(VCPKG_LIBRARY_LINKAGE dynamic)
16+ # if(NOT VCPKG_DEFAULT_TRIPLET)
17+ # set(VCPKG_DEFAULT_TRIPLET $ENV{VCPKG_DEFAULT_TRIPLET})
18+ # endif()
19+ # if(NOT VCPKG_TARGET_TRIPLET)
20+ # set(VCPKG_TARGET_TRIPLET $ENV{VCPKG_TARGET_TRIPLET})
2221# endif()
22+ # if(NOT VCPKG_TARGET_TRIPLET)
23+ # set(VCPKG_TARGET_TRIPLET ${VCPKG_DEFAULT_TRIPLET})
24+ # endif()
25+ message ("VCPKG_DEFAULT_TRIPLET = ${VCPKG_DEFAULT_TRIPLET} " )
26+ if (NOT APPLE )
27+ set (VCPKG_CRT_LINKAGE static )
28+ set (VCPKG_LIBRARY_LINKAGE static )
29+ endif ()
2330set (VCPKG_BUILD_TYPE release)
2431set (CMAKE_TOOLCHAIN_FILE "${VCPKG_ROOT} /scripts/buildsystems/vcpkg.cmake"
2532 CACHE STRING "Vcpkg toolchain file" )
2633
2734if (WIN32 )
2835 set (BUILD_SHARED_LIBS OFF )
29- # set(VCPKG_LIBRARY_LINKAGE static)
30- # FIX: unsure if this matters but doesn't break things on arm64
31- # set(VCPKG_TARGET_TRIPLET x64-windows-static)
32- # FIX: this should be equivalent to x64-windows-static - why does it work on arm64?
33- # message("CMAKE_SYSTEM_PROCESSOR = ${CMAKE_SYSTEM_PROCESSOR}")
34- # set(VCPKG_TARGET_ARCHITECTURE x64)
35- # set(VCPKG_CRT_LINKAGE static)
36- # set(VCPKG_LIBRARY_LINKAGE static)
3736 set (CMAKE_FIND_LIBRARY_SUFFIXES ".lib" )
3837
3938# # Enable Hot Reload for MSVC compilers if supported.
0 commit comments