forked from falk-werner/webfuse
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
63 lines (49 loc) · 1.84 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
51
52
53
54
55
56
57
58
59
60
61
62
63
cmake_minimum_required (VERSION 3.10)
project(webfuse VERSION 0.4.0 DESCRIPTION "Websocket filesystem based on libfuse")
option(WITHOUT_TESTS "disable unit tests" OFF)
option(WITHOUT_ADAPTER "disable adapter library" OFF)
option(WITHOUT_PROVIDER "disable provider library" OFF)
set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH};${CMAKE_CURRENT_SOURCE_DIR}/cmake")
include(coverage)
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)
find_package(PkgConfig REQUIRED)
pkg_check_modules(LWS REQUIRED libwebsockets)
pkg_check_modules(JANSSON REQUIRED jansson)
add_definitions(-D_FILE_OFFSET_BITS=64)
set(CMAKE_C_STANDARD 99)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(C_WARNINGS -Wall -Wextra -Werror)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
include_directories(
"include"
${LWS_INCLUDE_DIRS}
${JANSSON_INCLUDE_DIRS}
)
add_compile_options(
${C_WARNINGS}
${LWS_CFLAGS_OTHER}
${JANSSON_CFLAGS_OTHER}
"-pthread"
)
include(webfuse_core)
include(webfuse_adapter)
include(webfuse_provider)
include(unit_tests)
set(CPACK_SOURCE_GENERATOR "TGZ")
set(CPACK_GENERATOR "DEB")
set(CPACK_PACKAGE_VERSION_MAJOR "${PROJECT_VERSION_MAJOR}")
set(CPACK_PACKAGE_VERSION_MINOR "${PROJECT_VERSION_MINOR}")
set(CPACK_PACKAGE_VERSION_PATCH "${PROJECT_VERSION_PATCH}")
set(CPACK_DESCRIPTION "Websocket filesystem based on libfuse")
#set(CPACK_COMPONENTS_ALL libraries)
set(CPACK_DEB_COMPONENT_INSTALL ON)
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Falk Werner")
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
set(CPACK_DEBIAN_LIBRARIES_FILE_NAME "webfuse_${PROJECT_VERSION}_${CMAKE_SYSTEM_NAME}.deb")
set(CPACK_DEBIAN_LIBRARIES_PACKAGE_NAME "webfuse")
set(CPACK_DEBIAN_HEADERS_FILE_NAME "webfuse-dev_${PROJECT_VERSION}_${CMAKE_SYSTEM_NAME}.deb")
set(CPACK_DEBIAN_HEADERS_PACKAGE_NAME "webfuse-dev")
set(CPACK_DEBIAN_HEADERS_PACKAGE_DEPENDS "webfuse")
include(CPack)