mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 05:40:01 -06:00
Add option to use shared gtest library if available
This commit is contained in:
@ -7,6 +7,7 @@ project(dolphin-emu)
|
|||||||
option(USE_EGL "Enables EGL OpenGL Interface" OFF)
|
option(USE_EGL "Enables EGL OpenGL Interface" OFF)
|
||||||
option(TRY_X11 "Enables X11 Support" ON)
|
option(TRY_X11 "Enables X11 Support" ON)
|
||||||
option(USE_SHARED_ENET "Use shared libenet if found rather than Dolphin's soon-to-compatibly-diverge version" OFF)
|
option(USE_SHARED_ENET "Use shared libenet if found rather than Dolphin's soon-to-compatibly-diverge version" OFF)
|
||||||
|
option(USE_SHARED_GTEST "Use shared gtest library if found" OFF)
|
||||||
option(USE_UPNP "Enables UPnP port mapping support" ON)
|
option(USE_UPNP "Enables UPnP port mapping support" ON)
|
||||||
option(DISABLE_WX "Disable wxWidgets (use Qt or CLI interface)" OFF)
|
option(DISABLE_WX "Disable wxWidgets (use Qt or CLI interface)" OFF)
|
||||||
option(ENABLE_QT2 "Enable Qt2 (use the other experimental Qt interface)" OFF)
|
option(ENABLE_QT2 "Enable Qt2 (use the other experimental Qt interface)" OFF)
|
||||||
@ -906,8 +907,15 @@ include_directories("${PROJECT_BINARY_DIR}/Source/Core/Common")
|
|||||||
########################################
|
########################################
|
||||||
# Unit testing.
|
# Unit testing.
|
||||||
#
|
#
|
||||||
|
include(FindGTest)
|
||||||
|
if(GTEST_FOUND AND USE_SHARED_GTEST)
|
||||||
|
message("Using shared gtest")
|
||||||
|
include_directories(${GTEST_INCLUDE_DIRS})
|
||||||
|
else()
|
||||||
|
message("Using static gtest from Externals")
|
||||||
include_directories(Externals/gtest/include)
|
include_directories(Externals/gtest/include)
|
||||||
add_subdirectory(Externals/gtest)
|
add_subdirectory(Externals/gtest)
|
||||||
|
endif(GTEST_FOUND)
|
||||||
|
|
||||||
enable_testing()
|
enable_testing()
|
||||||
add_custom_target(unittests)
|
add_custom_target(unittests)
|
||||||
|
Reference in New Issue
Block a user