Organize stuffs
This commit is contained in:
parent
a9240cac6e
commit
c120871293
13 changed files with 625 additions and 56 deletions
|
@ -7,11 +7,23 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|||
# Find SDL2
|
||||
find_package(SDL2 REQUIRED)
|
||||
|
||||
# Collect all source files
|
||||
set(SOURCES
|
||||
src/main.cpp
|
||||
src/core/Application.cpp
|
||||
src/window/Window.cpp
|
||||
src/renderer/Renderer.cpp
|
||||
src/events/EventManager.cpp
|
||||
)
|
||||
|
||||
# Add executable
|
||||
add_executable(${PROJECT_NAME} src/main.cpp)
|
||||
add_executable(${PROJECT_NAME} ${SOURCES})
|
||||
|
||||
# Link SDL2
|
||||
target_link_libraries(${PROJECT_NAME} SDL2::SDL2)
|
||||
|
||||
# Include directories for SDL2
|
||||
target_include_directories(${PROJECT_NAME} PRIVATE ${SDL2_INCLUDE_DIRS})
|
||||
|
||||
# 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