summaryrefslogtreecommitdiff
path: root/graphics/asymptote/cxxtests/cmake-scripts/external-libs.cmake
blob: 070d06a86895902f2e7f436b400eb568dac3bf72 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# Use directly downloaded library because vcpkg's version has some
# linking issues with windows + clang64-msys2

if (DOWNLOAD_GTEST_FROM_SRC)
    include(FetchContent)
    FetchContent_Declare(
            googletest
            GIT_REPOSITORY https://github.com/google/googletest
            GIT_TAG v1.14.0
    )

    if (WIN32)
        set(gtest_force_shared_crt ON CACHE INTERNAL "Force shared CRT")
    endif()

    FetchContent_MakeAvailable(googletest)
else()
    find_package(GTest REQUIRED)
endif()