forked from quarnster/freetype-gl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
executable file
·35 lines (27 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
CMAKE_MINIMUM_REQUIRED( VERSION 2.8.5 )
project(distmapgen)
# Config.
set(CMAKE_CXX "g++")
set(CMAKE_CXX_FLAGS "-ggdb3 -std=c++0x -Wno-write-strings")
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules"
"${CMAKE_MODULE_PATH}" )
# Find required libraries.
find_package(Math REQUIRED)
find_package(FreeType REQUIRED)
find_package(PNG REQUIRED)
# Set source files.
file(GLOB_RECURSE HEADERS "src/*.hpp")
file(GLOB_RECURSE SOURCES "src/*.cpp")
# Include libs directories.
include_directories(${FREETYPE_INCLUDE_DIRS}
${MATH_INCLUDE_DIRS}
${PNG_INCLUDE_DIRS}
src)
# Create executable and link libraries.
add_executable(${PROJECT_NAME} ${HEADERS} ${SOURCES})
target_link_libraries(${PROJECT_NAME} ${FREETYPE_LIBRARIES})
target_link_libraries(${PROJECT_NAME} ${MATH_LIBRARIES})
target_link_libraries(${PROJECT_NAME} ${PNG_LIBRARIES})
# Copy fonts into build directory for testing.
file(GLOB FONTS "fonts/*.ttf")
file(COPY ${FONTS} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/fonts)