forked from pikiwidb/rediscache
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
32 lines (23 loc) · 1.19 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
CMAKE_MINIMUM_REQUIRED(VERSION 3.0.0)
OPTION(BUILD_SHARED_LIBS "Build shared libraries" OFF)
OPTION(DISABLE_TESTS "If tests should be compiled or not" OFF)
PROJECT(rediscache LANGUAGES "C" VERSION 4.0.14)
AUX_SOURCE_DIRECTORY(. LIB_SOURCES)
SET(CMAKE_C_FLAGS "-std=c99 -O2 -pedantic -DREDIS_STATIC='' -Wall -W -Wno-missing-field-initializers -Wno-uninitialized -fPIC -Wcpp")
FILE(GLOB_RECURSE H_FILES "*.h")
ADD_LIBRARY(rediscache STATIC ${LIB_SOURCES})
#SET_TARGET_PROPERTIES(rediscache PROPERTIES PUBLIC_HEADER "${H_FILES}")
# SET({CMAKE_INSTALL_INCLUDEDIR} "include")
# INSTALL(TARGETS rediscache
# PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/rediscache"
# LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
# )
# INSTALL(TARGETS rediscache
# PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_PREFIX}
# LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}
# )
# message(STATUS "CMAKE_INSTALL_INCLUDEDIR ${CMAKE_INSTALL_INCLUDEDIR}")
# message(STATUS "CMAKE_INSTALL_LIBDIR ${CMAKE_INSTALL_LIBDIR}")
# message(STATUS "H_FILES ${H_FILES}")
INSTALL(FILES ${H_FILES} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/rediscache")
INSTALL(TARGETS rediscache DESTINATION "${CMAKE_INSTALL_LIBDIR}")