forked from Hopson97/HopsonCraft
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
executable file
·52 lines (44 loc) · 1.22 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
47
48
49
50
51
52
cmake_minimum_required(VERSION 3.1)
project(HopsonCraft)
set (CMAKE_CXX_STANDARD 14)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3")
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake_modules")
file(GLOB src_files
Source/*.cpp
Source/GUI/*.cpp
Source/HUD/*.cpp
Source/Input/*.cpp
Source/Maths/*.cpp
Source/Physics/*.cpp
Source/Player/*.cpp
Source/Renderer/*.cpp
Source/ResourceManagers/*.cpp
Source/Shaders/*.cpp
Source/States/*cpp
Source/Texture/*.cpp
Source/Util/*.cpp
Source/World/*.cpp
Source/World/Block/Types/*.cpp
Source/World/Block/*.cpp
)
find_package(OpenGL REQUIRED)
if (OPENGL_FOUND)
include_directories(${OPENGL_INCLUDE_DIRS})
link_libraries(${OPENGL_LIBRARIES})
endif()
find_package(GLEW REQUIRED)
if (GLEW_FOUND)
include_directories(${GLEW_INCLUDE_DIRS})
link_libraries(${GLEW_LIBRARIES})
endif()
find_package(SFML REQUIRED system window graphics network audio)
if (SFML_FOUND)
include_directories(${SFML_INCLUDE_DIRS})
link_libraries(${SFML_LIBRARIES})
endif()
find_package(Threads REQUIRED)
if (THREADS_FOUND)
link_libraries(Threads::Threads)
endif()
add_executable(game ${src_files})
set_target_properties(game PROPERTIES POSITION_INDEPENDENT_CODE ON)