added project loader

This commit is contained in:
2026-05-14 23:16:16 -04:00
parent 2dd5f3a648
commit 0ceea230cf
10 changed files with 134 additions and 30 deletions

View File

@@ -12,8 +12,23 @@ set (GLFW_BUILD_TESTS OFF)
set (GLFW_BUILD_DOCS OFF)
add_subdirectory(_ThirdParty/glfw)
add_subdirectory(_ThirdParty/glm)
include_directories(src/imgui)
file(GLOB_RECURSE IMGUI_SOURCES src/imgui/*.cpp)
file(GLOB_RECURSE SOURCES ${CMAKE_SOURCE_DIR}/src/*.cpp)
file(GLOB_RECURSE HEADERS ${CMAKE_SOURCE_DIR}/src/*.h)
add_subdirectory(_ThirdParty/entt)
add_subdirectory(_ThirdParty/fmt)
add_subdirectory(_ThirdParty/spdlog)
set(JSON_BuildTests OFF CACHE INTERNAL "")
add_subdirectory(_ThirdParty/json)
add_subdirectory(_ThirdParty/nfd)
set (ASSIMP_INSTALL OFF)
if(UNIX)
find_path(UNZIP_PATH unzip.h PATHS
@@ -26,26 +41,16 @@ if(UNIX)
endif()
add_subdirectory(_ThirdParty/assimp)
target_compile_options(assimp PRIVATE
-Wno-unused-but-set-variable
-Wno-unused-but-set-variable
)
add_subdirectory(_ThirdParty/glm)
add_subdirectory(_ThirdParty/entt)
add_subdirectory(_ThirdParty/fmt)
include_directories(src/imgui)
file(GLOB_RECURSE IMGUI_SOURCES src/imgui/*.cpp)
file(GLOB_RECURSE SOURCES ${CMAKE_SOURCE_DIR}/src/*.cpp)
file(GLOB_RECURSE HEADERS ${CMAKE_SOURCE_DIR}/src/*.h)
add_executable(${PROJECT_NAME}
${IMGUI_SOURCES}
${GLAD_SOURCE_DIR}/gl.c
${SOURCES}
${HEADERS})
${HEADERS}
src/ProjectManifestFile.cpp
src/ProjectManifestFile.h)
add_custom_target(copy_resources
COMMAND ${CMAKE_COMMAND} -E copy_directory
@@ -54,6 +59,7 @@ add_custom_target(copy_resources
COMMENT "Copying resources..."
)
target_link_libraries(${PROJECT_NAME} glfw spdlog assimp glm EnTT fmt)
target_link_libraries(${PROJECT_NAME} glfw spdlog assimp glm EnTT fmt nfd)
target_include_directories(${PROJECT_NAME} PRIVATE ${ASSIMP_INCLUDE_INSTALL_DIR})
target_include_directories(${PROJECT_NAME} PRIVATE src)
target_include_directories(${PROJECT_NAME} PRIVATE _ThirdParty/json/single_include)