2021-02-03 05:57:50 +08:00
|
|
|
# This file is part of the ZoneMinder Project.
|
|
|
|
#
|
|
|
|
# This file is free software; as a special exception the author gives
|
|
|
|
# unlimited permission to copy and/or distribute it, with or without
|
|
|
|
# modifications, as long as this notice is preserved.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful, but
|
|
|
|
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
|
|
|
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
|
|
|
|
|
|
|
|
include(Catch)
|
|
|
|
|
2021-02-03 07:30:34 +08:00
|
|
|
set(TEST_SOURCES
|
2021-05-03 05:04:26 +08:00
|
|
|
zm_box.cpp
|
2021-04-07 05:41:56 +08:00
|
|
|
zm_comms.cpp
|
2021-03-23 06:17:08 +08:00
|
|
|
zm_crypt.cpp
|
2021-04-12 15:07:35 +08:00
|
|
|
zm_font.cpp
|
2021-05-14 21:11:50 +08:00
|
|
|
zm_poly.cpp
|
2021-05-01 22:13:00 +08:00
|
|
|
zm_utils.cpp
|
|
|
|
zm_vector2.cpp)
|
2021-02-03 05:57:50 +08:00
|
|
|
|
|
|
|
add_executable(tests main.cpp ${TEST_SOURCES})
|
|
|
|
|
|
|
|
target_link_libraries(tests
|
|
|
|
PRIVATE
|
2021-02-09 05:36:34 +08:00
|
|
|
zm-core-interface
|
2021-02-03 05:57:50 +08:00
|
|
|
zm
|
|
|
|
${ZM_BIN_LIBS}
|
|
|
|
bcrypt
|
|
|
|
Catch2::Catch2)
|
|
|
|
|
|
|
|
target_include_directories(tests
|
|
|
|
PRIVATE
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR})
|
|
|
|
|
|
|
|
catch_discover_tests(tests)
|
2021-04-12 15:07:35 +08:00
|
|
|
|
|
|
|
add_custom_command(TARGET tests
|
|
|
|
PRE_BUILD
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_directory
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/data/ ${CMAKE_CURRENT_BINARY_DIR}/data/
|
|
|
|
BYPRODUCTS ${CMAKE_CURRENT_BINARY_DIR}/data/)
|