Add assimp and imgui dependencies
This commit is contained in:
parent
9dab0a933a
commit
b416f8da27
|
@ -7,8 +7,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|||
# Define output directories for different configurations
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
|
||||
|
||||
# Ensure vcpkg toolchain file is used
|
||||
# This is set through the CMakePresets.json or command line, so not directly here
|
||||
include(C:/users/jmchr/vcpkg/scripts/buildsystems/vcpkg.cmake)
|
||||
|
||||
# Find packages using vcpkg
|
||||
find_package(GLEW CONFIG REQUIRED)
|
||||
|
@ -34,14 +33,25 @@ file(GLOB SHADERS
|
|||
"${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_executable(TerraVisor ${SOURCES} ${HEADERS})
|
||||
add_executable(TerraVisor ${SOURCES} ${HEADERS} ${IMGUI_SOURCES})
|
||||
|
||||
# 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
|
||||
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
|
||||
add_custom_target(copy_shaders ALL
|
||||
|
|
Loading…
Reference in New Issue