From 4d5fa88c16203481f2abeb9662879e8839e2e9fe Mon Sep 17 00:00:00 2001 From: David McDougall Date: Tue, 3 Sep 2024 16:43:00 -0400 Subject: [PATCH] Fix the gtest CMake target, remove the 'd' postfix from debug builds --- external/gtest.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/external/gtest.cmake b/external/gtest.cmake index ccd9ac034a..d130442dc4 100644 --- a/external/gtest.cmake +++ b/external/gtest.cmake @@ -55,12 +55,12 @@ set(BUILD_GMOCK OFF CACHE BOOL "prevents building gmock" FORCE) add_subdirectory(${googletest_SOURCE_DIR} ${googletest_BINARY_DIR}) if(MSVC) - set(gtest_LIBRARIES ${REPOSITORY_DIR}/build/ThirdParty/lib/$<$:Release>$<$:Debug>/${CMAKE_STATIC_LIBRARY_PREFIX}gtest$<$:d>${CMAKE_STATIC_LIBRARY_SUFFIX}) + set(gtest_LIBRARIES ${REPOSITORY_DIR}/build/ThirdParty/lib/$<$:Release>$<$:Debug>/${CMAKE_STATIC_LIBRARY_PREFIX}gtest${CMAKE_STATIC_LIBRARY_SUFFIX}) else() if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug") set(DEBUG_POSTFIX d) endif() - set(gtest_LIBRARIES ${REPOSITORY_DIR}/build/ThirdParty/lib/${CMAKE_STATIC_LIBRARY_PREFIX}gtest$<$:d>${CMAKE_STATIC_LIBRARY_SUFFIX}) + set(gtest_LIBRARIES ${REPOSITORY_DIR}/build/ThirdParty/lib/${CMAKE_STATIC_LIBRARY_PREFIX}gtest${CMAKE_STATIC_LIBRARY_SUFFIX}) endif() FILE(APPEND "${EXPORT_FILE_NAME}" "gtest_INCLUDE_DIRS@@@${googletest_SOURCE_DIR}/googletest/include\n") FILE(APPEND "${EXPORT_FILE_NAME}" "gtest_LIBRARIES@@@${gtest_LIBRARIES}\n")