Cómo configurar y usar Google Test (como un submodule) con CMake

He clonado el repository de Google Test de GitHub en un repository personal y luego lo agregué como submodule a mi proyecto principal (usando git).

Quiero poder usar este submodule en mi proyecto principal usando #include "gtest/gtest.h"

La location de gtest en mi estructura de files es:

 C:\GIT\MyProj\Externals\ABCD\tests\externals\UnitTests\externals\GoogleTest\googletest\include\gtest 

UnitTests es un submodule y GoogleTest es un submodule dentro de ese submodule.

Mi bash de esto es:

 function(MyProjTestSetup) #initiaise stuff set(EXTERNAL_NAME Gtest) include(ExternalProject) set(GTEST_FORCE_SHARED_CRT ON) set(GTEST_DISABLE_PTHREADS OFF) if(MINGW) set(GTEST_DISABLE_PTHREADS ON) endif() if(WIN32) set(WINDOWS_CMAKE_ARGS -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG:PATH=DebugLibs -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE:PATH=ReleaseLibs ) else(WIN32) set(WINDOWS_CMAKE_ARGS ) endif(WIN32) set(${EXTERNAL_NAME}_PROJECT ${PROJECT_NAME}_${EXTERNAL_NAME}) #------------build Gtest---------------------- #--------------------------------------------- ExternalProject_Add(Gtest SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR} BINARY_DIR ${PROJECT_BINARY_DIR}/${EXTERNAL_NAME} CMAKE_ARGS ${WINDOWS_CMAKE_ARGS} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_CXX_FLAGS=${MSVC_COMPILER_DEFS} -Dgtest_force_shanetworking_crt=${GTEST_FORCE_SHARED_CRT} -Dgtest_disable_pthreads=${GTEST_DISABLE_PTHREADS} -DBUILD_GTEST=ON -DBUILD_GMOCK=OFF PREFIX "${CMAKE_CURRENT_BINARY_DIR}" # Disable install step INSTALL_COMMAND "" UPDATE_DISCONNECTED 1 ) # -----------Specify include dir-------------- #--------------------------------------------- set(${EXTERNAL_NAME}_INCLUDE_DIRS ${CMAKE_CURRENT_LIST_DIR}/tests/externals/UnitTests/externals/GoogleTest/googletest/include ) include_directories(${${EXTERNAL_NAME}_INCLUDE_DIRS}) # ---------Specify link libraries------------- #--------------------------------------------- set(${EXTERNAL_NAME}_LIBRARIES ${PROJECT_BINARY_DIR} ) endfunction() 

Esto da el error:

 NMAKE:-1: error: U1073: don't know how to make '\gtest.lib' 

¿Qué estoy haciendo mal?