From a17dcfdcba9f7da5a91c554eef88cea73d6598b0 Mon Sep 17 00:00:00 2001 From: Jacob McDonnell Date: Sun, 14 Jul 2024 13:04:54 -0400 Subject: Redid the Cmake Config and fell back to C17 --- CMakeLists.txt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) mode change 100644 => 100755 CMakeLists.txt (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt old mode 100644 new mode 100755 index 2207c93..1efe04d --- 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}) + -- cgit v1.2.3