
message(STATUS "*** Fetch Google Test ***")

FetchContent_Declare(googletest
  GIT_REPOSITORY https://github.com/google/googletest.git
  GIT_TAG release-1.10.0
)

FetchContent_MakeAvailable(googletest)

set(GOOGLETEST_INCLUDE_DIRS
	${CMAKE_BINARY_DIR}/_deps/googletest-src/googletest/include
)

set(GOOGLEMOCK_INCLUDE_DIRS PRIVATE 
	${CMAKE_BINARY_DIR}/_deps/googletest-src/googlemock/include
)

set_target_properties( gtest
    PROPERTIES
    ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/archive/"
    LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
    RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/runtime"
)

set_target_properties( gmock
    PROPERTIES
    ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/archive/"
    LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
    RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/runtime"
)