about summary refs log tree commit diff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2022-01-19 20:49:26 -0500
committerJune McEnroe <june@causal.agency>2022-01-19 20:49:26 -0500
commit344497630ac9ef2d46287cd574472ce369694076 (patch)
tree25d628a85126ec57e591627f4ffd4705a9bdebd8 /CMakeLists.txt
parentRemove README (diff)
downloadcards-344497630ac9ef2d46287cd574472ce369694076.tar.gz
cards-344497630ac9ef2d46287cd574472ce369694076.zip
Replace build system with cmake
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt18
1 files changed, 18 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..06ae91f
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,18 @@
+cmake_minimum_required(VERSION 3.10)
+
+project(cards)
+
+find_package(SDL2 REQUIRED)
+
+if(NOT MSVC)
+	add_compile_options(-Wall -Wextra -pedantic)
+endif()
+
+add_library(cards STATIC cards.c)
+target_link_libraries(cards SDL2::SDL2)
+
+add_executable(example EXCLUDE_FROM_ALL example.c)
+target_link_libraries(example cards SDL2::SDL2main)
+
+add_executable(dump EXCLUDE_FROM_ALL dump.c)
+target_link_libraries(dump cards)