mirror of
https://github.com/visualboyadvance-m/visualboyadvance-m
synced 2025-10-05 15:42:52 +02:00
[gtest] Use googletest as a submodule (#1373)
Some Linux distributions use a hermetic build environment to build. This resulted in issues with `FetchContent` attempting to download googletest at configure time. This fixes the issue by integrating googletest as a git submodule instead of downloading it at configure time.
This commit is contained in:
3
.gitmodules
vendored
3
.gitmodules
vendored
@@ -2,3 +2,6 @@
|
||||
path = win32-deps
|
||||
url = https://github.com/visualboyadvance-m/win32-deps.git
|
||||
branch = master
|
||||
[submodule "third_party/googletest"]
|
||||
path = third_party/googletest
|
||||
url = https://github.com/google/googletest.git
|
||||
|
@@ -90,14 +90,9 @@ endif()
|
||||
|
||||
# Configure gtest
|
||||
if(BUILD_TESTING)
|
||||
FetchContent_Declare(googletest
|
||||
URL https://github.com/google/googletest/archive/2d16ed055d09c3689d44b272adc097393de948a0.zip
|
||||
EXCLUDE_FROM_ALL
|
||||
)
|
||||
|
||||
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
|
||||
FetchContent_MakeAvailable(googletest)
|
||||
|
||||
set(INSTALL_GTEST OFF CACHE BOOL "" FORCE)
|
||||
add_subdirectory(./third_party/googletest)
|
||||
include(GoogleTest)
|
||||
endif()
|
||||
|
||||
|
1
third_party/googletest
vendored
Submodule
1
third_party/googletest
vendored
Submodule
Submodule third_party/googletest added at b514bdc898
Reference in New Issue
Block a user