-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
50 lines (39 loc) · 1.68 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
cmake_minimum_required (VERSION 3.2)
project(redisimagehelper VERSION 0.2)
set (CMAKE_CXX_STANDARD 11)
set(CMAKE_BUILD_TYPE Debug)
set(CMAKE_BUILD_TYPE RelWithDebInfo)
set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_LIST_DIR}/cmake/module)
find_package(hiredis REQUIRED)
if (NOT HIREDIS_FOUND)
message(FATAL_ERROR "hiredis not found.")
endif()
find_package(ev REQUIRED)
if (NOT EV_FOUND)
message(FATAL_ERROR "ev not found.")
endif()
find_package(curlpp)
if (NOT CURLPP_FOUND)
message("Warning: cURLpp not found.")
endif()
include_directories (${CMAKE_CURRENT_SOURCE_DIR}/include )
include_directories($(/usr/local/include/gstreamer-1.0) /gst)
file(GLOB HEADERS include/*.hpp)
file(GLOB LIBRARY_SOURCES
src/RedisImageHelper.cpp)
file(GLOB LIBRARY_HEADERS
include/Image.hpp
include/RedisImageHelper.hpp)
#Used to have access to CMAKE_INSTALL_*DIR
include(GNUInstallDirs)
add_library(redisimagehelper SHARED ${LIBRARY_SOURCES} ${LIBRARY_HEADERS})
set_target_properties(redisimagehelper PROPERTIES VERSION 0.2
SOVERSION 2)
set_target_properties(redisimagehelper PROPERTIES PUBLIC_HEADER "${LIBRARY_HEADERS}")
# This line will find the .pc.in tempalte file and replace @variable with their equivalent here
# For example in redisimagehelper.pc.in the variable @PROJECT_NAME@ will be replaced with
configure_file(redisimagehelper.pc.in redisimagehelper.pc @ONLY)
install(TARGETS redisimagehelper
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/redisimagehelper)
install(FILES ${CMAKE_BINARY_DIR}/redisimagehelper.pc DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/pkgconfig)