-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
26 lines (20 loc) · 1.01 KB
/
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
cmake_minimum_required(VERSION 3.7)
set(PROJECT_NAME sfml_project)
project(${PROJECT_NAME})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -static")
set(CMAKE_CXX_STANDARD 14)
set(SOURCE_FILES main.cpp Board.cpp Board.h Test.h Test.cpp TicTacToeBoard.cpp TicTacToeBoard.h BoardScorer.cpp BoardScorer.h TicTacToe.cpp TicTacToe.h Player.cpp Player.h GameText.cpp GameText.h Game.cpp Game.h Game_Interface.cpp Game_Interface.h Thumbnail.cpp Thumbnail.h)
if (CMAKE_BUILD_TYPE STREQUAL "Release")
add_executable(${PROJECT_NAME} WIN32 ${SOURCE_FILES})
else ()
add_executable(${PROJECT_NAME} ${SOURCE_FILES})
endif ()
set(SFML_ROOT C:/SFML_folder/SFML-2.5.1)
set(SFML_STATIC_LIBRARIES TRUE)
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake_modules")
#set(SFML_DIR C:/SFML/SFML-2.5.1/lib/cmake/SFML)
find_package(SFML REQUIRED COMPONENTS audio graphics window system)
if (SFML_FOUND)
include_directories(${SFML_INCLUDE_DIR})
target_link_libraries(${PROJECT_NAME} ${SFML_LIBRARIES} ${SFML_DEPENDENCIES})
endif ()