Files
2026-04-06 07:11:04 +10:00

42 lines
904 B
CMake

project(WeaponDetection_Tests LANGUAGES CXX)
add_executable(${PROJECT_NAME}
WeaponDetectionTest.cpp
)
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17)
target_compile_definitions(${PROJECT_NAME} PRIVATE
WIN32_LEAN_AND_MEAN
NOMINMAX
$<$<CONFIG:Debug>:_DEBUG>
$<$<CONFIG:Release>:NDEBUG>
)
target_include_directories(${PROJECT_NAME} PRIVATE
${TEST_COMMON_DIR}
${ANSLIB_INCLUDE_DIR}
${OPENCV_INCLUDE_DIR}
${CMAKE_SOURCE_DIR}/ANSCustomWeaponDetection
)
target_link_directories(${PROJECT_NAME} PRIVATE
${ANSLIB_LIB_DIR}
${OPENCV_LIB_DIR}
)
target_link_libraries(${PROJECT_NAME} PRIVATE
gtest
gtest_main
ANSLIB
opencv_world4130
ANSCustomWeaponDetection
)
if(MSVC)
target_compile_options(${PROJECT_NAME} PRIVATE /W3 /sdl /permissive-)
endif()
include(GoogleTest)
gtest_discover_tests(${PROJECT_NAME} DISCOVERY_MODE PRE_TEST)