1 # Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
15 # @file CMakeLists.txt
16 # @author Kyungwook Tak (k.tak@samsung.com)
17 # @brief Make common library for both of server and client
20 MESSAGE("Use Cynara as access control backend")
21 SET(AC_BACKEND_COMMON_REQUIRE cynara-creds-socket)
22 SET(AC_BACKEND_COMMON_SRCS common/credential-cynara.cpp)
24 PKG_CHECK_MODULES(${TARGET_CSR_COMMON}_DEP
28 ${AC_BACKEND_COMMON_REQUIRE}
31 SET(${TARGET_CSR_COMMON}_SRCS
32 common/audit/console-sink.cpp
33 common/audit/dlog-sink.cpp
34 common/audit/logger.cpp
35 common/binary-queue.cpp
38 common/cs-detected.cpp
43 common/kvp-container.cpp
45 common/native-mainloop.cpp
48 common/socket-descriptor.cpp
50 ${AC_BACKEND_COMMON_SRCS}
55 ${PROJECT_SOURCE_DIR}/src/include/csr
56 ${PROJECT_SOURCE_DIR}/src/include/csre
57 ${${TARGET_CSR_COMMON}_DEP_INCLUDE_DIRS}
60 ADD_LIBRARY(${TARGET_CSR_COMMON} SHARED ${${TARGET_CSR_COMMON}_SRCS})
62 SET_TARGET_PROPERTIES(${TARGET_CSR_COMMON}
64 COMPILE_FLAGS "-D_GNU_SOURCE -fvisibility=hidden"
65 SOVERSION ${API_VERSION}
69 TARGET_LINK_LIBRARIES(${TARGET_CSR_COMMON}
70 ${${TARGET_CSR_COMMON}_DEP_LIBRARIES}
73 INSTALL(TARGETS ${TARGET_CSR_COMMON} DESTINATION ${LIB_INSTALL_DIR})