-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
71 lines (56 loc) · 1.85 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#cmake ver req
cmake_minimum_required(VERSION 2.8)
set(project_name instanced_font_rendering)
#project name
project(${project_name})
#so that it talks to us
set(CMAKE_VERBOSE_MAKEFILE ON)
set(CMAKE_BUILD_TYPE Release)
if(UNIX)
add_definitions( "-Wall -Wno-long-long -ansi -pedantic -std=c++0x" )
endif()
if(${CMAKE_BUILD_TYPE} STREQUAL Debug)
add_definitions("-DDebug")
message("Debug mode")
endif()
if(${CMAKE_BUILD_TYPE} STREQUAL Release)
add_definitions("-DRelease")
message("Release mode")
endif()
#header files source
include_directories(${CMAKE_SOURCE_DIR})
link_directories(${CMAKE_SOURCE_DIR})
include_directories(${CMAKE_SOURCE_DIR}/external/include/)
link_directories(${CMAKE_SOURCE_DIR}/external/lib/)
include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
if(WIN32)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/../)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/../)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/../)
endif()
if(UNIX)
include_directories(
/usr/include/gtk-2.0
/usr/lib/x86_64-linux-gnu/gtk-2.0/include
/usr/include/atk-1.0
/usr/include/cairo
/usr/include/gdk-pixbuf-2.0
/usr/include/pango-1.0
/usr/include/gio-unix-2.0/
/usr/include/glib-2.0
/usr/lib/x86_64-linux-gnu/glib-2.0/include
/usr/include/pixman-1
/usr/include/freetype2
/usr/include/libpng12
)
endif()
if(UNIX)
set(${project_name}_external_libs sfml-window sfml-system sfml-audio sfml-graphics GL GLEW freetype)
endif()
if(WIN32)
set(${project_name}_external_libs optimized sfml-window debug sfml-window-d optimized sfml-system debug sfml-system-d
optimized sfml-audio debug sfml-audio-d optimized sfml-graphics debug sfml-graphics-d OpenGL32 GLEW32 freetype253)
endif()
#adding the project's exe
add_executable(${project_name} main font)
target_link_libraries(${project_name} ${${project_name}_external_libs})