forked from HopsonCommunity/Community-Game
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
46 lines (36 loc) · 1.05 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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# Specify the minimum CMAKE version required
cmake_minimum_required(VERSION 2.8)
# Your project's name
project(Community-Game)
# Make your header file accessible to the compiler
include_directories(include)
# Add all files from the source/ folder to CMake
file(GLOB_RECURSE SRC
"src/*.cpp"
"src/*.h"
"src/*.hpp"
)
# Define the executable
add_executable(${PROJECT_NAME} ${SRC})
include_directories(deps/SFML/include)
add_definitions(-DSFML_STATIC)
enable_testing()
set(SFML_BUILD_DOC OFF CACHE BOOL "" FORCE)
set(SFML_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
set(BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE)
set(CMAKE_BUILD_TYPE Debug)
add_subdirectory(deps/SFML)
# Copy static files
# Tired of manually copying it
file(COPY res/ DESTINATION Debug/res/)
target_link_libraries(${PROJECT_NAME} sfml-network sfml-graphics sfml-window sfml-system sfml-audio)
# Enable C++ 14
if (NOT UNIX)
set_target_properties(${PROJECT_NAME} PROPERTIES
CXX_STANDARD 14
CXX_STANDARD_REQUIRED ON
CXX_EXTENSIONS OFF
)
else()
add_definitions(-std=c++14)
endif()