2021-11-12 11:00:39 +01:00
|
|
|
cmake_minimum_required(VERSION 3.13)
|
2021-11-11 21:22:24 +01:00
|
|
|
|
|
|
|
cmake_policy(SET CMP0077 NEW)
|
|
|
|
|
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 "")
|
2021-11-12 11:00:39 +01:00
|
|
|
set(ozz_build_tests OFF 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
|
|
|
|
|
|
|
# Simulator Executable
|
|
|
|
add_executable(AnimTestbed)
|
|
|
|
target_include_directories(
|
2021-11-12 11:00:39 +01:00
|
|
|
AnimTestbed
|
|
|
|
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
|
|
|
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/glfw/deps>
|
|
|
|
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/Handmade-Math>
|
|
|
|
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/imgui>
|
|
|
|
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/sokol>
|
|
|
|
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/vectorial/include>
|
2021-11-11 21:22:24 +01:00
|
|
|
)
|
|
|
|
target_link_libraries(AnimTestbed glfw ozz_base ozz_geometry ozz_animation ${OPENGL_LIBRARIES})
|
|
|
|
|
2021-11-12 11:00:39 +01:00
|
|
|
target_sources(AnimTestbed PRIVATE
|
|
|
|
src/main.cc
|
|
|
|
src/Camera.c
|
|
|
|
3rdparty/glfw/deps/glad_gl.c
|
|
|
|
3rdparty/imgui/imgui.cpp
|
|
|
|
3rdparty/imgui/imgui_draw.cpp
|
|
|
|
3rdparty/imgui/imgui_widgets.cpp
|
|
|
|
3rdparty/imgui/imgui_demo.cpp
|
|
|
|
3rdparty/imgui/backends/imgui_impl_glfw.cpp
|
|
|
|
3rdparty/imgui/backends/imgui_impl_opengl3.cpp
|
|
|
|
)
|