-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
46 lines (31 loc) · 1.35 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
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
PROJECT(rpi_st7735)
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake_extensions/)
FIND_PACKAGE(VIGRA REQUIRED)
if (VIGRA_FOUND)
MESSAGE("-- > vigra found!")
INCLUDE_DIRECTORIES(SYSTEM ${VIGRA_INCLUDE_DIR})
LINK_DIRECTORIES( ${VIGRA_IMPEX_LIBRARY_DIR})
endif()
SET(CMAKE_CXX_FLAGS "-Wall -Wextra -Wfatal-errors -std=c++11 -pedantic -pthread")
SET(CMAKE_CXX_FLAGS_DEBUG "-g -O0")
SET(CMAKE_CXX_FLAGS_RELEASE "-O3 -Werror")
INCLUDE_DIRECTORIES("${PROJECT_SOURCE_DIR}/include/")
FILE(GLOB LIB_VIGRA "src/vigra_interface/*.cxx")
ADD_LIBRARY(vigra_interface SHARED ${LIB_VIGRA})
FILE(GLOB LIB "src/*.cxx")
ADD_LIBRARY(framebuffer SHARED ${LIB})
TARGET_LINK_LIBRARIES(vigra_interface ${VIGRA_IMPEX_LIBRARY})
INSTALL(TARGETS framebuffer LIBRARY DESTINATION lib)
INSTALL(DIRECTORY ${PROJECT_SOURCE_DIR}/include/framebuffer DESTINATION include)
INSTALL(TARGETS vigra_interface LIBRARY DESTINATION lib)
INSTALL(DIRECTORY ${PROJECT_SOURCE_DIR}/include/vigra_interface DESTINATION include)
INSTALL(DIRECTORY ${PROJECT_SOURCE_DIR}/include/pixel_drawer DESTINATION include)
SET(WITH_PYTHON true CACHE BOOL "Build with python wrapper.")
IF(WITH_PYTHON)
ADD_SUBDIRECTORY(python/)
ENDIF(WITH_PYTHON)
SET(WITH_EXAMPLES true CACHE BOOL "Build with examples.")
IF(WITH_EXAMPLES)
ADD_SUBDIRECTORY(examples/)
ENDIF(WITH_EXAMPLES)