-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
47 lines (43 loc) · 1.47 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
# Created by Arthur Asatryan
# Company: BiaCode
# Date: 7/5/15
# Copyright (c) 2015 BiaCode. All rights reserved.
cmake_minimum_required(VERSION 3.2)
project(BiaEngine)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
set(SOURCE_FILES main.cpp)
add_executable(BiaEngine ${SOURCE_FILES}
core/graphics/Window.cpp core/graphics/Window.h
core/util/logger.h
core/util/fileutil.h
core/shapes/Triangle2f.cpp core/shapes/Triangle2f.h
core/shapes/Rectangle2f.cpp core/shapes/Rectangle2f.h
core/game/BiaGame.cpp core/game/BiaGame.h
TestGame.cpp TestGame.h
core/game/GameState.cpp core/game/GameState.h
core/math/vec2.h core/math/vec2.cpp
core/math/vec3.h core/math/vec3.cpp
core/math/vec4.h core/math/vec4.cpp
core/math/mat4.cpp core/math/mat4.h
core/graphics/Shader.cpp core/graphics/Shader.h)
if (UNIX)
add_subdirectory(external/glfw)
add_subdirectory(external/glew)
include_directories(
external/glfw/include
external/glew/include
)
install(DIRECTORY core/shaders/ DESTINATION shaders)
target_link_libraries(BiaEngine glfw ${GLFW_LIBRARIES})
target_link_libraries(BiaEngine ${CMAKE_SOURCE_DIR}/external/glew/lib/libGLEW.a)
elseif(WIN32)
add_subdirectory(external/glfw)
add_subdirectory(external/glew)
include_directories(
external/glfw/include
external/glew/include
)
install(DIRECTORY core/shaders/ DESTINATION shaders)
target_link_libraries(BiaEngine glfw ${GLFW_LIBRARIES})
target_link_libraries(BiaEngine ${CMAKE_SOURCE_DIR}/external/glew/lib/Release/Win32/glew32.lib)
endif (UNIX)