-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
36 lines (31 loc) · 885 Bytes
/
CMakeLists.txt
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
26
27
28
29
30
31
32
33
34
35
36
cmake_minimum_required(VERSION 3.6)
project(hearts)
set(CMAKE_CXX_STANDARD 11)
set(SOURCE_FILES
Card.cpp
Card.h
Deck.cpp
Deck.h
Deck_iterator.cpp
Game.cpp
Game.h
Game_Hand.cpp
Game_Hand.h
Gui.cpp
Gui.h
main.cpp
Text_UI.cpp
Text_UI.h)
add_executable(hearts ${SOURCE_FILES})
# Detect and add SFML
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake_modules" ${CMAKE_MODULE_PATH})
#Find any version 2.X of SFML
#See the FindSFML.cmake file for additional details and instructions
find_package(SFML 2 REQUIRED graphics window system)
if(SFML_FOUND)
include_directories(${SFML_INCLUDE_DIR})
target_link_libraries(hearts ${SFML_LIBRARIES} ${SFML_DEPENDENCIES})
endif()
# -pthread
FIND_PACKAGE ( Threads REQUIRED )
target_link_libraries(hearts ${CMAKE_THREAD_LIBS_INIT})