summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rwxr-xr-x[-rw-r--r--]CMakeLists.txt10
1 files changed, 8 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2207c93..1efe04d 100644..100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,10 +1,13 @@
cmake_minimum_required(VERSION 3.28)
project(pong C)
-set(CMAKE_C_STANDARD 23)
+set(CMAKE_C_STANDARD 17)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -Wall -Werror")
+INCLUDE(FindPkgConfig)
+
find_package(SDL2 REQUIRED CONFIG REQUIRED COMPONENTS SDL2)
+#find_package(sdl2)
add_executable(pong main.c
pong.c
@@ -12,4 +15,7 @@ add_executable(pong main.c
screen.c
screen.h)
-target_link_libraries(pong PRIVATE SDL2::SDL2) \ No newline at end of file
+
+INCLUDE_DIRECTORIES(${SDL2_INCLUDE_DIRS})
+TARGET_LINK_LIBRARIES(pong ${SDL2_LIBRARIES})
+