Skip to content

Commit

Permalink
trying to include CMAKE_TOOLCHAIN_FILE, still fails...
Browse files Browse the repository at this point in the history
  • Loading branch information
bachittle committed Mar 10, 2023
1 parent 596c2b8 commit 2bd872b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -246,9 +246,9 @@ function(install_windows_deps)
set(ENV{ARCH} ${ARCH})
execute_process(
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/tools/setup-buildtools.cmd)
# set(CMAKE_TOOLCHAIN_FILE
# ${CMAKE_CURRENT_SOURCE_DIR}/tools/vcpkg/scripts/buildsystems/vcpkg.cmake
# CACHE FILEPATH "")
set(CMAKE_TOOLCHAIN_FILE
${CMAKE_CURRENT_SOURCE_DIR}/tools/vcpkg/scripts/buildsystems/vcpkg.cmake
CACHE FILEPATH "")
message(
"Make sure that vcpkg.cmake is set as the CMAKE_TOOLCHAIN_FILE at the START of the cmake build process!
Can be command-line arg (cmake -DCMAKE_TOOLCHAIN_FILE=...) or set in your editor of choice."
Expand Down Expand Up @@ -518,6 +518,7 @@ if(BUILD_TESTING)
find_package(GTest)
if(NOT (GTEST_FOUND OR GTest_FOUND))
install_windows_deps()
include(${CMAKE_TOOLCHAIN_FILE})
find_package(GTest REQUIRED)
endif()
else()
Expand Down

0 comments on commit 2bd872b

Please sign in to comment.