bcaa955ae74471e85ad8210289cfa628798dbbef
[platform/core/security/yaca.git] / examples / CMakeLists.txt
1 #
2 #  Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
3 #
4 #  Contact:
5 #
6 #  Licensed under the Apache License, Version 2.0 (the "License");
7 #  you may not use this file except in compliance with the License.
8 #  You may obtain a copy of the License at
9 #
10 #      http://www.apache.org/licenses/LICENSE-2.0
11 #
12 #  Unless required by applicable law or agreed to in writing, software
13 #  distributed under the License is distributed on an "AS IS" BASIS,
14 #  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 #  See the License for the specific language governing permissions and
16 #  limitations under the License
17 #
18 #
19 # @file   CMakeLists.txt
20 # @author Krzysztof Jackiewicz (k.jackiewicz@samsung.com)
21 # @version 1.0
22 # @brief
23 #
24
25 INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/api)
26
27 SET(COMMON_SOURCES
28                 ${CMAKE_CURRENT_SOURCE_DIR}/lorem.c
29                 ${CMAKE_CURRENT_SOURCE_DIR}/misc.c
30     )
31
32 FUNCTION(BUILD_EXAMPLE EXAMPLE_NAME SOURCE_FILE)
33     ADD_EXECUTABLE(${EXAMPLE_NAME}
34                     ${CMAKE_CURRENT_SOURCE_DIR}/${SOURCE_FILE}
35                     ${COMMON_SOURCES}
36         )
37     TARGET_LINK_LIBRARIES(${EXAMPLE_NAME} ${PROJECT_NAME})
38     INSTALL(TARGETS ${EXAMPLE_NAME}
39         DESTINATION /usr/bin
40         PERMISSIONS OWNER_READ
41                     OWNER_WRITE
42                     OWNER_EXECUTE
43                     GROUP_READ
44                     GROUP_EXECUTE
45                     WORLD_READ
46                     WORLD_EXECUTE
47         )
48 ENDFUNCTION(BUILD_EXAMPLE)
49
50 BUILD_EXAMPLE("owl-example-digest"       digest.c)
51 BUILD_EXAMPLE("owl-example-encrypt"      encrypt.c)
52 BUILD_EXAMPLE("owl-example-encrypt-gcm"  encrypt_aes_gcm.c)
53 BUILD_EXAMPLE("owl-example-sign"         sign.c)
54 BUILD_EXAMPLE("owl-example-key-exchange" key_exchange.c)
55 BUILD_EXAMPLE("owl-example-test"         test.c)