summary refs log tree commit diff
path: root/CMakeLists.txt
blob: 926fed037f15b38cc3491fa44346c123b262fc5c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
cmake_minimum_required(VERSION 3.10)

project(WEP)

find_package(SDL2 REQUIRED)
include_directories(${SDL2_INCLUDE_DIRS})

if(NOT MSVC)
	add_compile_options(-Wall -Wextra -pedantic)
endif()

include_directories(cards)
add_library(cards STATIC cards/cards.c)

add_executable(sol sol.c)
add_executable(freecell freecell.c)

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()