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
26 ${KEY_MANAGER_PATH}/service/ocsp-service.cpp
27 ${KEY_MANAGER_PATH}/service/ocsp-logic.cpp
30 SET_SOURCE_FILES_PROPERTIES(
31 ${KEY_MANAGER_SOURCES}
33 COMPILE_FLAGS "-D_GNU_SOURCE -fvisibility=hidden")
35 INCLUDE_DIRECTORIES(SYSTEM
36 ${KEY_MANAGER_DEP_INCLUDE_DIRS}
40 ${KEY_MANAGER_SRC_PATH}/include
41 ${KEY_MANAGER_PATH}/main
42 ${KEY_MANAGER_PATH}/common
43 ${KEY_MANAGER_PATH}/service
44 ${KEY_MANAGER_PATH}/sqlcipher
45 ${KEY_MANAGER_PATH}/dpl/core/include
46 ${KEY_MANAGER_PATH}/dpl/log/include
47 ${KEY_MANAGER_PATH}/dpl/db/include
50 ADD_EXECUTABLE(${TARGET_KEY_MANAGER} ${KEY_MANAGER_SOURCES})
52 TARGET_LINK_LIBRARIES(${TARGET_KEY_MANAGER}
53 ${KEY_MANAGER_DEP_LIBRARIES}
54 ${TARGET_KEY_MANAGER_COMMON}
55 ${TARGET_KEY_MANAGER_KEY_PROVIDER}
60 ################################################################################
62 SET(KEY_MANAGER_CLIENT_VERSION_MAJOR 1)
63 SET(KEY_MANAGER_CLIENT_VERSION ${KEY_MANAGER_CLIENT_VERSION_MAJOR}.0.1)
65 SET(KEY_MANAGER_CLIENT_SRC_PATH ${KEY_MANAGER_PATH}/client)
66 SET(KEY_MANAGER_CLIENT_CAPI_SRC_PATH ${KEY_MANAGER_PATH}/client-capi)
69 ${KEY_MANAGER_PATH}/client
70 ${KEY_MANAGER_PATH}/common
71 ${KEY_MANAGER_PATH}/dpl/core/include
72 ${KEY_MANAGER_PATH}/dpl/log/include
75 SET(KEY_MANAGER_CLIENT_SOURCES
76 ${KEY_MANAGER_CLIENT_SRC_PATH}/client-certificate.cpp
77 ${KEY_MANAGER_CLIENT_SRC_PATH}/client-common.cpp
78 ${KEY_MANAGER_CLIENT_SRC_PATH}/client-echo.cpp
79 ${KEY_MANAGER_CLIENT_SRC_PATH}/client-error.cpp
80 ${KEY_MANAGER_CLIENT_SRC_PATH}/client-key.cpp
81 ${KEY_MANAGER_CLIENT_SRC_PATH}/client-manager.cpp
82 ${KEY_MANAGER_CLIENT_SRC_PATH}/client-manager-impl.cpp
83 ${KEY_MANAGER_CLIENT_CAPI_SRC_PATH}/ckmc-type.cpp
84 ${KEY_MANAGER_CLIENT_CAPI_SRC_PATH}/ckmc-error.cpp
85 ${KEY_MANAGER_CLIENT_CAPI_SRC_PATH}/ckmc-manager.cpp
88 ADD_LIBRARY(${TARGET_KEY_MANAGER_CLIENT} SHARED ${KEY_MANAGER_CLIENT_SOURCES})
90 SET_TARGET_PROPERTIES(
91 ${TARGET_KEY_MANAGER_CLIENT}
93 COMPILE_FLAGS "-D_GNU_SOURCE -fPIC -fvisibility=default"
94 SOVERSION ${KEY_MANAGER_CLIENT_VERSION_MAJOR}
95 VERSION ${KEY_MANAGER_CLIENT_VERSION}
98 TARGET_LINK_LIBRARIES(${TARGET_KEY_MANAGER_CLIENT}
99 ${KEY_MANAGER_DEP_LIBRARIES}
100 ${TARGET_KEY_MANAGER_COMMON}
103 ################################################################################
105 SET(KEY_MANAGER_CONTROL_CLIENT_VERSION_MAJOR 1)
106 SET(KEY_MANAGER_CONTROL_CLIENT_VERSION ${KEY_MANAGER_CONTROL_CLIENT_VERSION_MAJOR}.0.1)
108 SET(KEY_MANAGER_CONTROL_CLIENT_SRC_PATH ${KEY_MANAGER_PATH}/client)
109 SET(KEY_MANAGER_CONTROL_CLIENT_CAPI_SRC_PATH ${KEY_MANAGER_PATH}/client-capi)
112 ${KEY_MANAGER_PATH}/client
113 ${KEY_MANAGER_PATH}/common
114 ${KEY_MANAGER_PATH}/dpl/core/include
115 ${KEY_MANAGER_PATH}/dpl/log/include
118 SET(KEY_MANAGER_CONTROL_CLIENT_SOURCES
119 ${KEY_MANAGER_CONTROL_CLIENT_SRC_PATH}/client-control.cpp
120 ${KEY_MANAGER_CONTROL_CLIENT_SRC_PATH}/client-common.cpp
121 ${KEY_MANAGER_CONTROL_CLIENT_CAPI_SRC_PATH}/ckmc-control.cpp
124 ADD_LIBRARY(${TARGET_KEY_MANAGER_CONTROL_CLIENT} SHARED ${KEY_MANAGER_CONTROL_CLIENT_SOURCES})
126 SET_TARGET_PROPERTIES(
127 ${TARGET_KEY_MANAGER_CONTROL_CLIENT}
129 COMPILE_FLAGS "-D_GNU_SOURCE -fPIC -fvisibility=default"
130 SOVERSION ${KEY_MANAGER_CONTROL_CLIENT_VERSION_MAJOR}
131 VERSION ${KEY_MANAGER_CONTROL_CLIENT_VERSION}
134 TARGET_LINK_LIBRARIES(${TARGET_KEY_MANAGER_CONTROL_CLIENT}
135 ${KEY_MANAGER_DEP_LIBRARIES}
136 ${TARGET_KEY_MANAGER_COMMON}
139 ################################################################################
140 INSTALL(TARGETS ${TARGET_KEY_MANAGER_CLIENT} DESTINATION ${LIB_INSTALL_DIR})
141 INSTALL(TARGETS ${TARGET_KEY_MANAGER_CONTROL_CLIENT} DESTINATION ${LIB_INSTALL_DIR})
143 INSTALL(TARGETS ${TARGET_KEY_MANAGER} DESTINATION bin)
147 ${KEY_MANAGER_SRC_PATH}/include/ckm/ckm-manager.h
148 ${KEY_MANAGER_SRC_PATH}/include/ckm/ckm-control.h
149 ${KEY_MANAGER_SRC_PATH}/include/ckm/ckm-error.h
150 ${KEY_MANAGER_SRC_PATH}/include/ckm/ckm-echo.h
151 ${KEY_MANAGER_SRC_PATH}/include/ckm/ckm-type.h
152 DESTINATION /usr/include/ckm/ckm
155 ${KEY_MANAGER_SRC_PATH}/include/ckmc/ckmc-manager.h
156 ${KEY_MANAGER_SRC_PATH}/include/ckmc/ckmc-control.h
157 ${KEY_MANAGER_SRC_PATH}/include/ckmc/ckmc-error.h
158 ${KEY_MANAGER_SRC_PATH}/include/ckmc/ckmc-type.h
159 DESTINATION /usr/include/ckm/ckmc
161 ################################################################################
163 ADD_SUBDIRECTORY(manager)