43 lines
1.0 KiB
CMake
43 lines
1.0 KiB
CMake
# ============================================================
|
|
# Mesh Tests
|
|
# ============================================================
|
|
|
|
set(MESH_TEST_SOURCES
|
|
test_mesh.cpp
|
|
test_mesh_loader.cpp
|
|
test_mesh_import_settings.cpp
|
|
)
|
|
|
|
add_executable(mesh_tests ${MESH_TEST_SOURCES})
|
|
|
|
if(MSVC)
|
|
set_target_properties(mesh_tests PROPERTIES
|
|
LINK_FLAGS "/NODEFAULTLIB:libcpmt.lib /NODEFAULTLIB:libcmt.lib"
|
|
)
|
|
endif()
|
|
|
|
target_link_libraries(mesh_tests
|
|
PRIVATE
|
|
XCEngine
|
|
GTest::gtest
|
|
GTest::gtest_main
|
|
)
|
|
|
|
target_include_directories(mesh_tests PRIVATE
|
|
${CMAKE_SOURCE_DIR}/engine/include
|
|
${CMAKE_SOURCE_DIR}/tests/fixtures
|
|
)
|
|
|
|
target_compile_definitions(mesh_tests PRIVATE
|
|
XCENGINE_TEST_FIXTURES_DIR="${CMAKE_SOURCE_DIR}/tests/fixtures"
|
|
)
|
|
|
|
add_custom_command(TARGET mesh_tests POST_BUILD
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
|
${CMAKE_SOURCE_DIR}/engine/third_party/assimp/bin/assimp-vc143-mt.dll
|
|
$<TARGET_FILE_DIR:mesh_tests>/assimp-vc143-mt.dll
|
|
)
|
|
|
|
include(GoogleTest)
|
|
gtest_discover_tests(mesh_tests)
|