-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
39 lines (28 loc) · 881 Bytes
/
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
cmake_minimum_required(VERSION 3.5)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
project(mkatlas)
option(DISABLE_FREETYPE "Disable Freetype")
find_package(PNG REQUIRED)
if (NOT ${DISABLE_FREETYPE})
find_package(Freetype)
if (NOT ${FREETYPE_FOUND})
message(WARNING "Application will be compiled with DISABLE_FREETYPE")
set(DISABLE_FREETYPE ON)
endif()
endif()
include_directories("src" ${PNG_INCLUDE_DIRS})
if (NOT ${DISABLE_FREETYPE})
include_directories(${FREETYPE_INCLUDE_DIRS})
endif()
add_definitions(${PNG_DEFINITIONS})
if (${DISABLE_FREETYPE})
add_definitions(-DDISABLE_FREETYPE)
endif()
project(mkatlas)
file(GLOB_RECURSE MKATLASSRC "src/*.cpp" "src/*.hpp")
add_executable(mkatlas ${MKATLASSRC})
target_link_libraries(mkatlas ${PNG_LIBRARIES})
if (NOT ${DISABLE_FREETYPE})
target_link_libraries(mkatlas ${FREETYPE_LIBRARIES})
endif()