2021-11-12 11:00:39 +01:00
|
|
|
cmake_minimum_required(VERSION 3.13)
|
2021-11-11 21:22:24 +01:00
|
|
|
|
2021-11-16 18:23:04 +01:00
|
|
|
set(CMAKE_POLICY_DEFAULT_CMP0077 NEW)
|
2021-11-11 21:22:24 +01:00
|
|
|
|
2021-11-12 11:00:39 +01:00
|
|
|
project(AnimTestbed
|
|
|
|
VERSION 0.0.1
|
|
|
|
LANGUAGES CXX C)
|
2021-11-11 21:22:24 +01:00
|
|
|
|
|
|
|
find_package(Threads)
|
|
|
|
find_package(OpenGL REQUIRED)
|
|
|
|
|
|
|
|
# glfw
|
|
|
|
set(GLFW_BUILD_DOCS Off)
|
|
|
|
set(GLFW_BUILD_EXAMPLES Off)
|
|
|
|
set(GLFW_BUILD_TESTS Off)
|
|
|
|
set(GLFW_BUILD_INSTALL Off)
|
2021-11-12 11:00:39 +01:00
|
|
|
add_subdirectory(3rdparty/glfw)
|
2021-11-11 21:22:24 +01:00
|
|
|
|
|
|
|
# ozz
|
|
|
|
set(ozz_build_tools ON)
|
|
|
|
set(ozz_build_fbx OFF CACHE BOOL "")
|
|
|
|
set(ozz_build_gltf ON)
|
|
|
|
set(ozz_build_data OFF CACHE BOOL "")
|
|
|
|
set(ozz_build_samples OFF CACHE BOOL "")
|
|
|
|
set(ozz_build_howtos OFF CACHE BOOL "")
|
2022-02-11 16:51:18 +01:00
|
|
|
set(ozz_build_tests ON CACHE BOOL "")
|
2021-11-11 21:22:24 +01:00
|
|
|
set(ozz_build_simd_ref OFF CACHE BOOL "")
|
|
|
|
set(ozz_build_msvc_rt_dll OFF CACHE BOOL "")
|
2021-11-12 11:00:39 +01:00
|
|
|
add_subdirectory(3rdparty/ozz-animation)
|
2021-11-11 21:22:24 +01:00
|
|
|
|
2022-02-11 16:51:18 +01:00
|
|
|
set(ThirdPartyIncludeDeps
|
2021-11-12 11:00:39 +01:00
|
|
|
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
|
|
|
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/glfw/deps>
|
2021-11-16 18:15:56 +01:00
|
|
|
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/glfw/deps>
|
2021-11-12 11:00:39 +01:00
|
|
|
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/Handmade-Math>
|
|
|
|
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/imgui>
|
2022-02-11 16:51:18 +01:00
|
|
|
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/imnodes>
|
2021-11-16 18:15:56 +01:00
|
|
|
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/ozz-animation/include>
|
2021-11-12 11:00:39 +01:00
|
|
|
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/sokol>
|
|
|
|
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/vectorial/include>
|
2022-02-11 16:51:18 +01:00
|
|
|
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/>
|
2021-11-16 18:15:56 +01:00
|
|
|
)
|
2021-11-11 21:22:24 +01:00
|
|
|
|
2021-11-16 18:15:56 +01:00
|
|
|
# Shared code by main executable and tests
|
|
|
|
add_library(AnimTestbedCode OBJECT
|
2021-11-19 12:40:14 +01:00
|
|
|
src/SyncTrack.cc
|
|
|
|
src/SyncTrack.h
|
2022-01-22 09:25:50 +01:00
|
|
|
src/ozzutils.cc
|
2022-03-25 11:46:44 +01:00
|
|
|
src/AnimGraph/AnimGraphResource.cc
|
|
|
|
src/AnimGraph/AnimGraphResource.h
|
|
|
|
src/AnimGraph/AnimGraph.cc
|
2023-03-26 13:25:44 +02:00
|
|
|
src/AnimGraph/AnimGraph.h
|
|
|
|
src/AnimGraph/AnimGraphNodes.cc
|
|
|
|
src/AnimGraph/AnimGraphNodes.h
|
|
|
|
src/AnimGraph/AnimGraphData.cc
|
|
|
|
src/AnimGraph/AnimGraphData.h)
|
2021-11-16 18:15:56 +01:00
|
|
|
|
|
|
|
target_include_directories(
|
|
|
|
AnimTestbedCode
|
2022-01-22 09:25:50 +01:00
|
|
|
PUBLIC
|
|
|
|
src
|
2021-11-16 18:15:56 +01:00
|
|
|
${ThirdPartyIncludeDeps}
|
|
|
|
)
|
|
|
|
|
2022-02-11 16:51:18 +01:00
|
|
|
target_compile_features(AnimTestbedCode PRIVATE cxx_std_17)
|
|
|
|
|
2021-11-16 18:15:56 +01:00
|
|
|
# AnimTestbed Executable
|
|
|
|
add_executable(AnimTestbed)
|
|
|
|
target_include_directories(
|
|
|
|
AnimTestbed
|
2022-01-22 09:25:50 +01:00
|
|
|
PUBLIC
|
2021-11-16 18:15:56 +01:00
|
|
|
${ThirdPartyIncludeDeps}
|
|
|
|
)
|
|
|
|
|
|
|
|
target_sources(AnimTestbed PRIVATE
|
|
|
|
src/main.cc
|
|
|
|
src/SkinnedMeshRenderer.cc
|
2023-03-30 18:11:54 +02:00
|
|
|
src/AnimGraph/AnimGraphEditor.cc
|
|
|
|
src/AnimGraph/AnimGraphEditor.h
|
|
|
|
src/Camera.c
|
|
|
|
src/SkinnedMesh.cc
|
|
|
|
src/SkinnedMesh.h
|
|
|
|
src/SkinnedMeshResource.cc
|
|
|
|
src/SkinnedMeshResource.h
|
2021-11-16 18:15:56 +01:00
|
|
|
3rdparty/glfw/deps/glad_gl.c
|
2023-03-30 18:11:54 +02:00
|
|
|
3rdparty/imgui/imgui.cpp
|
|
|
|
3rdparty/imgui/imgui_draw.cpp
|
|
|
|
3rdparty/imgui/imgui_widgets.cpp
|
2023-04-14 17:44:25 +02:00
|
|
|
3rdparty/imgui/imgui_tables.cpp
|
2021-11-12 11:00:39 +01:00
|
|
|
3rdparty/imgui/imgui_demo.cpp
|
|
|
|
3rdparty/imgui/backends/imgui_impl_glfw.cpp
|
|
|
|
3rdparty/imgui/backends/imgui_impl_opengl3.cpp
|
2023-04-14 17:44:25 +02:00
|
|
|
3rdparty/imgui/misc/cpp/imgui_stdlib.cpp
|
|
|
|
3rdparty/imnodes/imnodes.cpp
|
2023-04-21 11:55:36 +02:00
|
|
|
3rdparty/imgui-node-editor/imgui_node_editor.cpp
|
|
|
|
3rdparty/imgui-node-editor/imgui_node_editor_api.cpp
|
|
|
|
3rdparty/imgui-node-editor/imgui_node_editor.h
|
|
|
|
3rdparty/imgui-node-editor/imgui_node_editor_internal.h
|
|
|
|
3rdparty/imgui-node-editor/imgui_bezier_math.h
|
|
|
|
3rdparty/imgui-node-editor/imgui_bezier_math.inl
|
|
|
|
3rdparty/imgui-node-editor/imgui_canvas.cpp
|
|
|
|
3rdparty/imgui-node-editor/imgui_canvas.h
|
|
|
|
3rdparty/imgui-node-editor/imgui_extra_math.h
|
|
|
|
3rdparty/imgui-node-editor/imgui_extra_math.inl
|
|
|
|
3rdparty/imgui-node-editor/crude_json.cpp
|
|
|
|
3rdparty/imgui-node-editor/crude_json.h
|
2021-11-12 11:00:39 +01:00
|
|
|
)
|
2021-11-16 18:15:56 +01:00
|
|
|
|
|
|
|
target_link_libraries(AnimTestbed AnimTestbedCode glfw ozz_base ozz_geometry ozz_animation ${OPENGL_LIBRARIES})
|
|
|
|
|
|
|
|
# Tests
|
|
|
|
add_executable(runtests)
|
|
|
|
|
2022-04-13 11:14:29 +02:00
|
|
|
set(ozz_offline_test_objs
|
|
|
|
3rdparty/ozz-animation/src/animation/offline/skeleton_builder.cc
|
|
|
|
3rdparty/ozz-animation/src/animation/offline/raw_skeleton.cc
|
|
|
|
3rdparty/ozz-animation/src/animation/offline/animation_builder.cc
|
|
|
|
3rdparty/ozz-animation/src/animation/offline/raw_animation.cc
|
|
|
|
)
|
|
|
|
|
2022-02-11 16:51:18 +01:00
|
|
|
target_sources(runtests PRIVATE
|
|
|
|
tests/AnimGraphResourceTests.cc
|
2022-04-13 11:14:29 +02:00
|
|
|
tests/AnimGraphEvalTests.cc
|
2023-03-29 22:25:09 +02:00
|
|
|
tests/NodeDescriptorTests.cc
|
2022-02-11 16:51:18 +01:00
|
|
|
tests/SyncTrackTests.cc
|
|
|
|
tests/main.cc
|
2022-04-13 11:14:29 +02:00
|
|
|
${ozz_offline_test_objs}
|
2022-02-11 16:51:18 +01:00
|
|
|
)
|
|
|
|
|
2021-11-16 18:15:56 +01:00
|
|
|
target_include_directories(
|
|
|
|
runtests
|
2021-11-16 18:23:04 +01:00
|
|
|
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>
|
2022-04-13 11:14:29 +02:00
|
|
|
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/ozz-animation/src>
|
2021-11-16 18:15:56 +01:00
|
|
|
${ThirdPartyIncludeDeps}
|
|
|
|
)
|
|
|
|
|
2022-02-11 16:51:18 +01:00
|
|
|
target_compile_features(runtests PRIVATE cxx_std_17)
|
|
|
|
|
2021-11-16 18:15:56 +01:00
|
|
|
target_link_libraries(runtests AnimTestbedCode glfw ozz_base ozz_geometry ozz_animation)
|