43 lines
1.4 KiB
CMake
43 lines
1.4 KiB
CMake
cmake_minimum_required(VERSION 3.16)
|
|
|
|
# Simple unit test executable that compiles acutest.c directly
|
|
add_executable(unit_tests
|
|
test.cpp
|
|
hot_reload.cpp
|
|
script_engine_tests.cpp
|
|
math_bindings_tests.cpp
|
|
${CMAKE_SOURCE_DIR}/src/HotReload.cpp
|
|
${CMAKE_SOURCE_DIR}/src/scripting/ScriptEngine.cpp
|
|
${CMAKE_SOURCE_DIR}/src/scripting/ScriptBindings.cpp
|
|
${CMAKE_SOURCE_DIR}/src/scripting/ToastBindings.cpp
|
|
${CMAKE_SOURCE_DIR}/src/scripting/LogBindings.cpp
|
|
${CMAKE_SOURCE_DIR}/src/scripting/DrawBindings.cpp
|
|
${CMAKE_SOURCE_DIR}/src/scripting/ImageBindings.cpp
|
|
${CMAKE_SOURCE_DIR}/src/scripting/TextureBindings.cpp
|
|
${CMAKE_SOURCE_DIR}/src/scripting/MathBindings.cpp
|
|
${CMAKE_SOURCE_DIR}/src/log/log.c
|
|
)
|
|
|
|
target_include_directories(unit_tests PRIVATE
|
|
${CMAKE_SOURCE_DIR}/tests
|
|
${CMAKE_SOURCE_DIR}/include
|
|
${CMAKE_SOURCE_DIR}/src/log
|
|
${CMAKE_SOURCE_DIR}/external/angelscript/sdk/angelscript/include
|
|
${CMAKE_SOURCE_DIR}/external/angelscript/sdk/add_on/scriptstdstring
|
|
${CMAKE_SOURCE_DIR}/external/angelscript/sdk/add_on/scriptbuilder
|
|
${CMAKE_SOURCE_DIR}/external/raylib/src
|
|
${CMAKE_SOURCE_DIR}/external/imgui
|
|
${CMAKE_SOURCE_DIR}/external/rlImGui
|
|
|
|
)
|
|
|
|
# Link AngelScript and its add-ons needed by ScriptEngine
|
|
target_link_libraries(unit_tests PRIVATE
|
|
angelscript
|
|
scriptstdstring
|
|
scriptbuilder
|
|
raylib
|
|
imgui
|
|
)
|
|
|
|
add_test(NAME unit_tests COMMAND unit_tests) |