if(NOT UNITTEST)
	message(FATAL_ERROR "UNITTEST is not defined!")
endif()

if(NOT UNITTEST_SRCFILES)
	set(UNITTEST_SRCFILES main.cpp)
endif()

add_executable(${UNITTEST} ${UNITTEST_SRCFILES})

TARGET_LINK_LIBRARIES(${UNITTEST} PRIVATE json-dto::json-dto)
TARGET_LINK_LIBRARIES(${UNITTEST} PRIVATE json-dto::catch_main)
TARGET_INCLUDE_DIRECTORIES(${UNITTEST} PRIVATE ${CMAKE_SOURCE_DIR})

add_test(NAME ${UNITTEST} COMMAND ${UNITTEST})
