i've added so much and idek anymore
This commit is contained in:
parent
c120871293
commit
51ff181659
19 changed files with 1573 additions and 10 deletions
|
@ -7,13 +7,26 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|||
# Find SDL2
|
||||
find_package(SDL2 REQUIRED)
|
||||
|
||||
# GLM - direct path approach for macOS/Homebrew
|
||||
set(GLM_INCLUDE_DIR "/opt/homebrew/include")
|
||||
if(EXISTS "${GLM_INCLUDE_DIR}/glm/glm.hpp")
|
||||
message(STATUS "Found GLM at: ${GLM_INCLUDE_DIR}")
|
||||
else()
|
||||
message(FATAL_ERROR "GLM not found at ${GLM_INCLUDE_DIR}/glm/glm.hpp")
|
||||
endif()
|
||||
|
||||
# Collect all source files
|
||||
set(SOURCES
|
||||
src/main.cpp
|
||||
src/core/Application.cpp
|
||||
src/core/InputHandler.cpp
|
||||
src/window/Window.cpp
|
||||
src/renderer/Renderer.cpp
|
||||
src/events/EventManager.cpp
|
||||
src/particles/Particle.cpp
|
||||
src/particles/ParticleManager.cpp
|
||||
src/particles/ParticleSystem.cpp
|
||||
src/particles/ParticleFactory.cpp
|
||||
)
|
||||
|
||||
# Add executable
|
||||
|
@ -22,8 +35,17 @@ add_executable(${PROJECT_NAME} ${SOURCES})
|
|||
# Link SDL2
|
||||
target_link_libraries(${PROJECT_NAME} SDL2::SDL2)
|
||||
|
||||
# GLM is header-only, no linking needed
|
||||
# target_link_libraries(${PROJECT_NAME} ${GLM_LIBRARIES})
|
||||
|
||||
# Include directories for SDL2
|
||||
target_include_directories(${PROJECT_NAME} PRIVATE ${SDL2_INCLUDE_DIRS})
|
||||
|
||||
# Include directories for GLM - set globally
|
||||
include_directories(${GLM_INCLUDE_DIR})
|
||||
|
||||
# Alternative approach: also set via CMAKE_CXX_FLAGS as fallback
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -I${GLM_INCLUDE_DIR}")
|
||||
|
||||
# Set include directories for our source files
|
||||
target_include_directories(${PROJECT_NAME} PRIVATE src)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue