aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@gmail.com>2026-02-18 13:19:52 +0100
committerFelix Morgner <felix.morgner@gmail.com>2026-02-18 13:19:52 +0100
commit2a1f31365dade481c32efc3307f94cc052d00f7f (patch)
tree54acaae0d6c18106a82eb263e3b860197908f903 /CMakeLists.txt
parent63fd09807c528915ac5ba6bc9eb11520cbf073e0 (diff)
downloadsnake.s-2a1f31365dade481c32efc3307f94cc052d00f7f.tar.xz
snake.s-2a1f31365dade481c32efc3307f94cc052d00f7f.zip
refactor: split SDL bindings
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt12
1 files changed, 12 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2d88dcf..d8f7928 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -8,6 +8,17 @@ project("snake.s"
find_package("SDL2" REQUIRED)
+add_library("SDL2_bindings" INTERFACE
+ "libs/SDL.S"
+ "libs/SDL/init.S"
+ "libs/SDL/render.S"
+ "libs/SDL/video.S"
+)
+
+target_include_directories("SDL2_bindings" INTERFACE
+ "${CMAKE_CURRENT_SOURCE_DIR}/libs"
+)
+
add_executable("snake.s"
"src/error.S"
"src/main.S"
@@ -15,6 +26,7 @@ add_executable("snake.s"
target_link_libraries("snake.s" PRIVATE
"SDL2::SDL2"
+ "SDL2_bindings"
)
install(TARGETS "snake.s")