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 # @author Sangwan Kwon (sangwan.kwon@samsung.com)
20 ######################### VCORE #########################
22 IF(TIZEN_PROFILE_MOBILE)
23 ADD_DEFINITIONS("-DTIZEN_PROFILE_MOBILE")
24 SET(LIB_CERT_CHECKER cert-checker)
25 ENDIF(TIZEN_PROFILE_MOBILE)
27 PKG_CHECK_MODULES(VCORE_DEPS
38 ADD_DEFINITIONS(${VCORE_DEPS_CFLAGS})
39 ADD_DEFINITIONS(${VCORE_DEPS_CFLAGS_OTHER})
42 dpl/core/src/assert.cpp
43 dpl/core/src/exception.cpp
44 dpl/core/src/singleton.cpp
45 dpl/core/src/colors.cpp
47 dpl/log/src/abstract_log_provider.cpp
48 dpl/log/src/old_style_log_provider.cpp
49 dpl/log/src/dlog_log_provider.cpp
50 dpl/log/src/journal_log_provider.cpp
56 vcore/CertificateCollection.cpp
57 vcore/CertificateConfigReader.cpp
58 vcore/CertificateLoader.cpp
59 vcore/CertStoreType.cpp
60 vcore/ReferenceValidator.cpp
62 vcore/SignatureData.cpp
63 vcore/SignatureFinder.cpp
64 vcore/SignatureReader.cpp
65 vcore/TimeConversion.cpp
66 vcore/ValidatorFactories.cpp
67 vcore/SignatureValidator.cpp
68 vcore/XmlsecAdapter.cpp
74 vcore/PluginHandler.cpp
86 ${VCORE_DEPS_INCLUDE_DIRS}
90 ADD_LIBRARY(${TARGET_VCORE_LIB} SHARED ${VCORE_SOURCES})
92 # TODO: visibility needed to be hidden
93 SET_TARGET_PROPERTIES(${TARGET_VCORE_LIB}
95 COMPILE_FLAGS "-D_GNU_SOURCE -fPIC -fvisibility=default"
96 SOVERSION ${SO_VERSION}
99 TARGET_LINK_LIBRARIES(${TARGET_VCORE_LIB}
100 ${VCORE_DEPS_LIBRARIES}
101 ${TARGET_CERT_SVC_LIB}
105 INSTALL(TARGETS ${TARGET_VCORE_LIB}
106 DESTINATION ${LIB_INSTALL_DIR}
109 ######################### CERT_SERVER #########################
111 PKG_CHECK_MODULES(CERT_SERVER_DEP
120 SET(CERT_SERVER_DIR ${CMAKE_CURRENT_SOURCE_DIR}/server)
123 ${CERT_SERVER_DIR}/src/cert-server-main.c
124 ${CERT_SERVER_DIR}/src/cert-server-logic.c
125 ${CERT_SERVER_DIR}/src/cert-server-db.c
131 ${CERT_SERVER_DEP_INCLUDE_DIRS}
132 ${CERT_SERVER_DIR}/include
135 SET_SOURCE_FILES_PROPERTIES(
138 COMPILE_FLAGS "-D_GNU_SOURCE -fvisibility=hidden -fPIE"
141 ADD_EXECUTABLE(${TARGET_CERT_SERVER} ${CERT_SERVER_SRC})
143 TARGET_LINK_LIBRARIES(${TARGET_CERT_SERVER}
144 ${CERT_SERVER_DEP_LIBRARIES}
148 INSTALL(TARGETS ${TARGET_CERT_SERVER} DESTINATION ${BIN_DIR})
150 ######################### API HEADERS #########################
153 vcore/SignatureValidator.h
154 vcore/SignatureFinder.h
156 vcore/SignatureData.h
157 vcore/CertStoreType.h
159 vcore/ValidatorPluginApi.h
161 DESTINATION ${INCLUDEDIR}/cert-svc/vcore
169 cert-svc/cprimitives.h
171 DESTINATION ${INCLUDEDIR}/cert-svc/cert-svc