Minor CMake refactor
This commit is contained in:
@@ -19,5 +19,40 @@ find_package(spdlog REQUIRED)
|
||||
find_package(fx-gltf REQUIRED)
|
||||
|
||||
add_subdirectory(${PROJECT_SOURCE_DIR}/lib)
|
||||
add_subdirectory(${PROJECT_SOURCE_DIR}/src)
|
||||
|
||||
add_library(fever_core
|
||||
src/components/transform.cpp
|
||||
src/core/application.cpp
|
||||
src/core/camera.cpp
|
||||
src/core/glad.cpp
|
||||
src/core/graphics/framebuffer.cpp
|
||||
src/core/graphics/image.cpp
|
||||
src/core/graphics/material.cpp
|
||||
src/core/graphics/mesh.cpp
|
||||
src/core/light.cpp
|
||||
src/core/render.cpp
|
||||
src/core/shader.cpp
|
||||
src/core/time.cpp
|
||||
src/input/input.cpp
|
||||
src/scene/gltf.cpp
|
||||
src/scene/gltf_loader.cpp
|
||||
src/util/log.cpp
|
||||
src/window/window.cpp
|
||||
)
|
||||
|
||||
target_compile_features(fever_core PUBLIC cxx_std_20)
|
||||
target_include_directories(fever_core PUBLIC ${CMAKE_SOURCE_DIR}/src)
|
||||
|
||||
target_link_libraries(
|
||||
fever_core PUBLIC
|
||||
glad
|
||||
stb
|
||||
glfw
|
||||
EnTT::EnTT
|
||||
spdlog::spdlog
|
||||
glm::glm
|
||||
fx-gltf::fx-gltf
|
||||
nlohmann_json::nlohmann_json
|
||||
)
|
||||
|
||||
add_subdirectory(${PROJECT_SOURCE_DIR}/apps)
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
add_library(fever_core
|
||||
components/transform.cpp
|
||||
core/application.cpp
|
||||
core/camera.cpp
|
||||
core/glad.cpp
|
||||
core/graphics/framebuffer.cpp
|
||||
core/graphics/image.cpp
|
||||
core/graphics/material.cpp
|
||||
core/graphics/mesh.cpp
|
||||
core/light.cpp
|
||||
core/render.cpp
|
||||
core/shader.cpp
|
||||
core/time.cpp
|
||||
input/input.cpp
|
||||
scene/gltf.cpp
|
||||
scene/gltf_loader.cpp
|
||||
util/log.cpp
|
||||
window/window.cpp
|
||||
)
|
||||
|
||||
target_compile_features(fever_core PUBLIC cxx_std_20)
|
||||
target_include_directories(fever_core PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
target_link_libraries(
|
||||
fever_core PUBLIC
|
||||
glad
|
||||
stb
|
||||
glfw
|
||||
EnTT::EnTT
|
||||
spdlog::spdlog
|
||||
glm::glm
|
||||
fx-gltf::fx-gltf
|
||||
nlohmann_json::nlohmann_json
|
||||
)
|
||||
Reference in New Issue
Block a user