27 lines
773 B
CMake
27 lines
773 B
CMake
cmake_minimum_required(VERSION 3.22.0)
|
|
|
|
set(PROJECT_NAME dinkyecs_sandbox)
|
|
|
|
project(${PROJECT_NAME})
|
|
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
|
|
|
find_package(nlohmann_json)
|
|
find_package(fmt)
|
|
|
|
add_library(dinkyecs STATIC dbc.hpp dbc.cpp dinkyecs.hpp)
|
|
target_link_libraries(dinkyecs ${PROJECT_DEPS} nlohmann_json::nlohmann_json fmt::fmt)
|
|
|
|
set(PROJECT_DEPS dinkyecs)
|
|
|
|
add_executable(${PROJECT_NAME} main.cpp)
|
|
target_link_libraries(${PROJECT_NAME} ${PROJECT_DEPS})
|
|
|
|
#######################################################
|
|
find_package(Catch2 REQUIRED)
|
|
file(GLOB TEST_SRC ./tests/*.cpp ./tests/*.hpp ./tests/*.h)
|
|
add_executable(tests ${TEST_SRC})
|
|
target_link_libraries(tests PRIVATE Catch2::Catch2WithMain ${PROJECT_DEPS})
|
|
|
|
include(CTest)
|
|
include(Catch)
|
|
catch_discover_tests(tests)
|