IPBS_Station/SDK/Depend/CSerialPort/test/gtest.cmake
2024-08-13 17:07:34 +08:00

18 lines
499 B
CMake

set(GOOGLETEST_ROOT googletest/googletest)
include_directories(SYSTEM
${PROJECT_SOURCE_DIR}/${GOOGLETEST_ROOT}
${PROJECT_SOURCE_DIR}/${GOOGLETEST_ROOT}/include
)
set(GOOGLETEST_SOURCES
${PROJECT_SOURCE_DIR}/${GOOGLETEST_ROOT}/src/gtest-all.cc
${PROJECT_SOURCE_DIR}/${GOOGLETEST_ROOT}/src/gtest_main.cc
)
foreach(_source ${GOOGLETEST_SOURCES})
set_source_files_properties(${_source} PROPERTIES GENERATED 1)
endforeach()
add_library(gtest STATIC ${GOOGLETEST_SOURCES})