summary refs log tree commit diff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--CMakeLists.txt21
1 files changed, 14 insertions, 7 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 06ae91f..926fed0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,18 +1,25 @@
 cmake_minimum_required(VERSION 3.10)
 
-project(cards)
+project(WEP)
 
 find_package(SDL2 REQUIRED)
+include_directories(${SDL2_INCLUDE_DIRS})
 
 if(NOT MSVC)
 	add_compile_options(-Wall -Wextra -pedantic)
 endif()
 
-add_library(cards STATIC cards.c)
-target_link_libraries(cards SDL2::SDL2)
+include_directories(cards)
+add_library(cards STATIC cards/cards.c)
 
-add_executable(example EXCLUDE_FROM_ALL example.c)
-target_link_libraries(example cards SDL2::SDL2main)
+add_executable(sol sol.c)
+add_executable(freecell freecell.c)
 
-add_executable(dump EXCLUDE_FROM_ALL dump.c)
-target_link_libraries(dump cards)
+target_link_libraries(sol cards SDL2::SDL2 SDL2::SDL2main)
+target_link_libraries(freecell cards SDL2::SDL2 SDL2::SDL2main)
+
+# Avoid conflicting with SOL.EXE, FREECELL.EXE on Windows
+if(WIN32)
+	set_target_properties(sol PROPERTIES OUTPUT_NAME wepsol)
+	set_target_properties(freecell PROPERTIES OUTPUT_NAME wepfreecell)
+endif()