2 # Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License
17 ADD_DEFINITIONS("-DCERT_SVC_EXAMPLES=\"${CERT_SVC_EXAMPLES}\"")
19 INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src)
21 FUNCTION(BUILD_EXAMPLE EXAMPLE_NAME SOURCE_FILE)
22 ADD_EXECUTABLE(${EXAMPLE_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/${SOURCE_FILE})
23 TARGET_LINK_LIBRARIES(${EXAMPLE_NAME} ${TARGET_VCORE_LIB})
24 INSTALL(TARGETS ${EXAMPLE_NAME}
25 DESTINATION ${BIN_DIR}
26 PERMISSIONS OWNER_READ
33 INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${SOURCE_FILE}
34 DESTINATION ${CERT_SVC_EXAMPLES})
35 ENDFUNCTION(BUILD_EXAMPLE)
37 BUILD_EXAMPLE("cert-svc-example-vcore-until-3.0" signature-validator-until-3.0.cpp)
38 BUILD_EXAMPLE("cert-svc-example-vcore-since-4.0" signature-validator-since-4.0.cpp)
40 INSTALL(DIRECTORY resource
41 DESTINATION ${CERT_SVC_EXAMPLES})