initial
This commit is contained in:
30
CMakeLists.txt
Normal file
30
CMakeLists.txt
Normal file
@@ -0,0 +1,30 @@
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
project(minesweeper C)
|
||||
|
||||
set(CMAKE_C_STANDARD 99)
|
||||
|
||||
# Find SDL2 and SDL2_ttf using pkg-config
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(SDL2 REQUIRED sdl2)
|
||||
pkg_check_modules(SDL2TTF REQUIRED SDL2_ttf)
|
||||
|
||||
include_directories(
|
||||
${SDL2_INCLUDE_DIRS}
|
||||
${SDL2TTF_INCLUDE_DIRS}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src
|
||||
)
|
||||
|
||||
link_directories(
|
||||
${SDL2_LIBRARY_DIRS}
|
||||
${SDL2TTF_LIBRARY_DIRS}
|
||||
)
|
||||
|
||||
add_executable(minesweeper
|
||||
src/main.c
|
||||
src/game.c
|
||||
)
|
||||
|
||||
target_link_libraries(minesweeper
|
||||
${SDL2_LIBRARIES}
|
||||
${SDL2TTF_LIBRARIES}
|
||||
)
|
||||
Reference in New Issue
Block a user