Add assimp and imgui dependencies

This commit is contained in:
Jack Christensen 2024-08-11 14:52:19 -04:00
parent 9dab0a933a
commit b416f8da27
1 changed files with 15 additions and 5 deletions

View File

@ -7,8 +7,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
# Define output directories for different configurations # Define output directories for different configurations
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
# Ensure vcpkg toolchain file is used include(C:/users/jmchr/vcpkg/scripts/buildsystems/vcpkg.cmake)
# This is set through the CMakePresets.json or command line, so not directly here
# Find packages using vcpkg # Find packages using vcpkg
find_package(GLEW CONFIG REQUIRED) find_package(GLEW CONFIG REQUIRED)
@ -34,14 +33,25 @@ file(GLOB SHADERS
"${CMAKE_SOURCE_DIR}/shaders/*.glsl" "${CMAKE_SOURCE_DIR}/shaders/*.glsl"
) )
# Add ImGui source files
file(GLOB IMGUI_SOURCES
"${CMAKE_SOURCE_DIR}/imgui/*.cpp"
"${CMAKE_SOURCE_DIR}/imgui/backends/imgui_impl_glfw.cpp"
"${CMAKE_SOURCE_DIR}/imgui/backends/imgui_impl_opengl3.cpp"
)
# Add the executable # Add the executable
add_executable(TerraVisor ${SOURCES} ${HEADERS}) add_executable(TerraVisor ${SOURCES} ${HEADERS} ${IMGUI_SOURCES})
# Include directories # Include directories
include_directories(${CMAKE_SOURCE_DIR}/headers) include_directories(
${CMAKE_SOURCE_DIR}/headers
${CMAKE_SOURCE_DIR}/imgui
${CMAKE_SOURCE_DIR}/imgui/backends
)
# Link libraries using vcpkg # Link libraries using vcpkg
target_link_libraries(TerraVisor PRIVATE GLEW::GLEW glfw glm::glm assimp::assimp opengl32) target_link_libraries(TerraVisor PRIVATE GLEW::GLEW glfw glm::glm assimp::assimp)
# Custom target for shaders # Custom target for shaders
add_custom_target(copy_shaders ALL add_custom_target(copy_shaders ALL