1 PKG_CHECK_MODULES(KEY_MANAGER_DEP
9 SET(KEY_MANAGER_SRC_PATH ${PROJECT_SOURCE_DIR}/src)
10 SET(KEY_MANAGER_PATH ${PROJECT_SOURCE_DIR}/src/manager)
12 SET(KEY_MANAGER_SOURCES
13 ${KEY_MANAGER_PATH}/main/key-manager-util.cpp
14 ${KEY_MANAGER_PATH}/main/generic-socket-manager.cpp
15 ${KEY_MANAGER_PATH}/main/socket-manager.cpp
16 ${KEY_MANAGER_PATH}/main/key-manager-main.cpp
17 ${KEY_MANAGER_PATH}/service/echo.cpp
18 ${KEY_MANAGER_PATH}/service/ckm-service.cpp
19 ${KEY_MANAGER_PATH}/service/ckm-logic.cpp
20 ${KEY_MANAGER_PATH}/service/key-provider.cpp
21 ${KEY_MANAGER_PATH}/service/ocsp.cpp
22 ${KEY_MANAGER_PATH}/service/crypto-logic.cpp
23 ${KEY_MANAGER_PATH}/service/CryptoService.cpp
24 ${KEY_MANAGER_PATH}/service/file-system.cpp
25 ${KEY_MANAGER_PATH}/service/db-crypto.cpp
28 SET_SOURCE_FILES_PROPERTIES(
29 ${KEY_MANAGER_SOURCES}
31 COMPILE_FLAGS "-D_GNU_SOURCE -fvisibility=hidden")
33 INCLUDE_DIRECTORIES(SYSTEM
34 ${KEY_MANAGER_DEP_INCLUDE_DIRS}
38 ${KEY_MANAGER_SRC_PATH}/include
39 ${KEY_MANAGER_PATH}/main
40 ${KEY_MANAGER_PATH}/common
41 ${KEY_MANAGER_PATH}/service
42 ${KEY_MANAGER_PATH}/sqlcipher
43 ${KEY_MANAGER_PATH}/dpl/core/include
44 ${KEY_MANAGER_PATH}/dpl/log/include
45 ${KEY_MANAGER_PATH}/dpl/db/include
48 ADD_EXECUTABLE(${TARGET_KEY_MANAGER} ${KEY_MANAGER_SOURCES})
50 TARGET_LINK_LIBRARIES(${TARGET_KEY_MANAGER}
51 ${KEY_MANAGER_DEP_LIBRARIES}
52 ${TARGET_KEY_MANAGER_COMMON}
53 ${TARGET_KEY_MANAGER_KEY_PROVIDER}
58 ################################################################################
60 SET(KEY_MANAGER_CLIENT_VERSION_MAJOR 1)
61 SET(KEY_MANAGER_CLIENT_VERSION ${KEY_MANAGER_CLIENT_VERSION_MAJOR}.0.1)
63 SET(KEY_MANAGER_CLIENT_SRC_PATH ${KEY_MANAGER_PATH}/client)
64 SET(KEY_MANAGER_CLIENT_CAPI_SRC_PATH ${KEY_MANAGER_PATH}/client-capi)
67 ${KEY_MANAGER_PATH}/client
68 ${KEY_MANAGER_PATH}/common
69 ${KEY_MANAGER_PATH}/dpl/core/include
70 ${KEY_MANAGER_PATH}/dpl/log/include
73 SET(KEY_MANAGER_CLIENT_SOURCES
74 ${KEY_MANAGER_CLIENT_SRC_PATH}/client-certificate.cpp
75 ${KEY_MANAGER_CLIENT_SRC_PATH}/client-common.cpp
76 ${KEY_MANAGER_CLIENT_SRC_PATH}/client-echo.cpp
77 ${KEY_MANAGER_CLIENT_SRC_PATH}/client-error.cpp
78 ${KEY_MANAGER_CLIENT_SRC_PATH}/client-key.cpp
79 ${KEY_MANAGER_CLIENT_SRC_PATH}/client-manager.cpp
80 ${KEY_MANAGER_CLIENT_SRC_PATH}/client-manager-impl.cpp
81 ${KEY_MANAGER_CLIENT_CAPI_SRC_PATH}/ckmc-type.cpp
82 ${KEY_MANAGER_CLIENT_CAPI_SRC_PATH}/ckmc-error.cpp
83 ${KEY_MANAGER_CLIENT_CAPI_SRC_PATH}/ckmc-manager.cpp
86 ADD_LIBRARY(${TARGET_KEY_MANAGER_CLIENT} SHARED ${KEY_MANAGER_CLIENT_SOURCES})
88 SET_TARGET_PROPERTIES(
89 ${TARGET_KEY_MANAGER_CLIENT}
91 COMPILE_FLAGS "-D_GNU_SOURCE -fPIC -fvisibility=default"
92 SOVERSION ${KEY_MANAGER_CLIENT_VERSION_MAJOR}
93 VERSION ${KEY_MANAGER_CLIENT_VERSION}
96 TARGET_LINK_LIBRARIES(${TARGET_KEY_MANAGER_CLIENT}
97 ${KEY_MANAGER_DEP_LIBRARIES}
98 ${TARGET_KEY_MANAGER_COMMON}
101 ################################################################################
103 SET(KEY_MANAGER_CONTROL_CLIENT_VERSION_MAJOR 1)
104 SET(KEY_MANAGER_CONTROL_CLIENT_VERSION ${KEY_MANAGER_CONTROL_CLIENT_VERSION_MAJOR}.0.1)
106 SET(KEY_MANAGER_CONTROL_CLIENT_SRC_PATH ${KEY_MANAGER_PATH}/client)
107 SET(KEY_MANAGER_CONTROL_CLIENT_CAPI_SRC_PATH ${KEY_MANAGER_PATH}/client-capi)
110 ${KEY_MANAGER_PATH}/client
111 ${KEY_MANAGER_PATH}/common
112 ${KEY_MANAGER_PATH}/dpl/core/include
113 ${KEY_MANAGER_PATH}/dpl/log/include
116 SET(KEY_MANAGER_CONTROL_CLIENT_SOURCES
117 ${KEY_MANAGER_CONTROL_CLIENT_SRC_PATH}/client-control.cpp
118 ${KEY_MANAGER_CONTROL_CLIENT_SRC_PATH}/client-common.cpp
119 ${KEY_MANAGER_CONTROL_CLIENT_CAPI_SRC_PATH}/ckmc-control.cpp
122 ADD_LIBRARY(${TARGET_KEY_MANAGER_CONTROL_CLIENT} SHARED ${KEY_MANAGER_CONTROL_CLIENT_SOURCES})
124 SET_TARGET_PROPERTIES(
125 ${TARGET_KEY_MANAGER_CONTROL_CLIENT}
127 COMPILE_FLAGS "-D_GNU_SOURCE -fPIC -fvisibility=default"
128 SOVERSION ${KEY_MANAGER_CONTROL_CLIENT_VERSION_MAJOR}
129 VERSION ${KEY_MANAGER_CONTROL_CLIENT_VERSION}
132 TARGET_LINK_LIBRARIES(${TARGET_KEY_MANAGER_CONTROL_CLIENT}
133 ${KEY_MANAGER_DEP_LIBRARIES}
134 ${TARGET_KEY_MANAGER_COMMON}
137 ################################################################################
138 INSTALL(TARGETS ${TARGET_KEY_MANAGER_CLIENT} DESTINATION ${LIB_INSTALL_DIR})
139 INSTALL(TARGETS ${TARGET_KEY_MANAGER_CONTROL_CLIENT} DESTINATION ${LIB_INSTALL_DIR})
141 INSTALL(TARGETS ${TARGET_KEY_MANAGER} DESTINATION bin)
145 ${KEY_MANAGER_SRC_PATH}/include/ckm/ckm-manager.h
146 ${KEY_MANAGER_SRC_PATH}/include/ckm/ckm-control.h
147 ${KEY_MANAGER_SRC_PATH}/include/ckm/ckm-error.h
148 ${KEY_MANAGER_SRC_PATH}/include/ckm/ckm-echo.h
149 ${KEY_MANAGER_SRC_PATH}/include/ckm/ckm-type.h
150 DESTINATION /usr/include/ckm/ckm
153 ${KEY_MANAGER_SRC_PATH}/include/ckmc/ckmc-manager.h
154 ${KEY_MANAGER_SRC_PATH}/include/ckmc/ckmc-control.h
155 ${KEY_MANAGER_SRC_PATH}/include/ckmc/ckmc-error.h
156 ${KEY_MANAGER_SRC_PATH}/include/ckmc/ckmc-type.h
157 DESTINATION /usr/include/ckm/ckmc
159 ################################################################################
161 ADD_SUBDIRECTORY(manager)