2022-04-23 14:48:42 +03:00
|
|
|
cmake_minimum_required(VERSION 3.0)
|
|
|
|
|
project(demo)
|
|
|
|
|
|
|
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
|
|
|
|
|
|
|
|
|
include(FindPkgConfig)
|
|
|
|
|
find_package(glfw3 3.3 REQUIRED)
|
|
|
|
|
find_package(OpenGL REQUIRED)
|
2023-04-24 11:24:26 +03:00
|
|
|
find_package(SDL2 REQUIRED)
|
|
|
|
|
include_directories(${SDL2_INCLUDE_DIRS})
|
2022-04-23 14:48:42 +03:00
|
|
|
|
|
|
|
|
include_directories("src/")
|
|
|
|
|
include_directories("gl/include")
|
2022-04-24 07:15:30 +03:00
|
|
|
include_directories("lib/easyloggingpp/src")
|
2022-04-23 16:41:33 +03:00
|
|
|
add_subdirectory(lib/glm EXCLUDE_FROM_ALL)
|
2022-04-24 13:45:14 +03:00
|
|
|
include_directories("lib/imgui")
|
|
|
|
|
include_directories("lib/imgui/backends")
|
2022-04-23 23:51:28 +03:00
|
|
|
|
2022-04-23 14:48:42 +03:00
|
|
|
add_subdirectory(src)
|
2022-04-23 23:51:28 +03:00
|
|
|
add_subdirectory(src/animation)
|
2022-04-24 07:15:30 +03:00
|
|
|
add_subdirectory(src/demo)
|
2022-04-23 14:48:42 +03:00
|
|
|
|
2022-04-24 13:45:14 +03:00
|
|
|
set(SOURCE
|
|
|
|
|
${SOURCE}
|
|
|
|
|
${CMAKE_SOURCE_DIR}/lib/imgui/imgui.cpp
|
|
|
|
|
${CMAKE_SOURCE_DIR}/lib/imgui/imgui_demo.cpp
|
|
|
|
|
${CMAKE_SOURCE_DIR}/lib/imgui/imgui_draw.cpp
|
|
|
|
|
${CMAKE_SOURCE_DIR}/lib/imgui/imgui_tables.cpp
|
|
|
|
|
${CMAKE_SOURCE_DIR}/lib/imgui/imgui_widgets.cpp
|
|
|
|
|
${CMAKE_SOURCE_DIR}/lib/imgui/backends/imgui_impl_glfw.cpp
|
|
|
|
|
${CMAKE_SOURCE_DIR}/lib/imgui/backends/imgui_impl_opengl3.cpp
|
|
|
|
|
)
|
|
|
|
|
|
2022-04-24 07:15:30 +03:00
|
|
|
add_executable(demo main.cpp gl/src/glad.c ${SOURCE} lib/easyloggingpp/src/easylogging++.cc)
|
2023-04-24 11:24:26 +03:00
|
|
|
target_link_libraries(demo glfw OpenGL::GL ${SDL2_LIBRARIES})
|