23 lines
594 B
CMake
23 lines
594 B
CMake
cmake_minimum_required(VERSION 3.10)
|
|
project(snake)
|
|
include_directories(include)
|
|
set(SOURCES
|
|
src/main.cpp
|
|
src/snake.cpp
|
|
src/input.cpp
|
|
src/window.cpp
|
|
src/point.cpp
|
|
src/fruit.cpp
|
|
)
|
|
add_executable(snake ${SOURCES})
|
|
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
|
set(CMAKE_C_STANDARD 23)
|
|
set(CMAKE_C_STANDARD_REQUIRED ON)
|
|
find_package(Curses REQUIRED)
|
|
include_directories(${CURSES_INCLUDE_DIR})
|
|
target_link_libraries(snake ${CURSES_LIBRARIES})
|
|
|
|
|
|
# find_package(SDL3 CONFIG REQUIRED) # An example of how to import libraries from vcpkg
|
|
# target_link_libraries(Game PRIVATE SDL3::SDL3)
|