Remove dead code related to downloadable TA
[platform/core/security/tef-simulator.git] / simulatordaemon / CMakeLists.txt
1 # Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
2 #
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
6 #
7 #        http://www.apache.org/licenses/LICENSE-2.0
8 #
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.
14 #
15 # @file
16 # @author  Lukasz Kostyra (l.kostyra@samsung.com)
17 # @brief   CMakeLists for tef-simulator daemon unit
18 #
19
20 PKG_CHECK_MODULES(DAEMON_DEPS REQUIRED
21                   cynara-client
22                   cynara-session
23                   cynara-creds-socket
24                   security-manager
25                   libsystemd-daemon
26                   dlog
27                   )
28
29 # We require tef-libteec only for tee_client_api.h header
30 # to prevent linking with tef-libteec, we must keep the module separate
31 PKG_CHECK_MODULES(DAEMON_LIBTEEC_DEP REQUIRED
32                   tef-libteec
33                   )
34
35 FIND_PACKAGE(Threads REQUIRED)
36
37 SET(DAEMON_SOURCES
38     ${DAEMON_PATH}/src/ConnectionSession.cpp
39     ${DAEMON_PATH}/src/ioService.cpp
40     ${DAEMON_PATH}/src/SecurityContext.cpp
41     ${DAEMON_PATH}/src/Session.cpp
42     ${DAEMON_PATH}/src/SimulatorDaemon.cpp
43     ${DAEMON_PATH}/src/SimulatorDaemonServer.cpp
44     ${DAEMON_PATH}/src/TAFactory.cpp
45     ${DAEMON_PATH}/src/TAInstance.cpp
46     ${DAEMON_PATH}/src/TEEContext.cpp
47     ${DAEMON_PATH}/src/ClientCommands/CommandCloseSession.cpp
48     ${DAEMON_PATH}/src/ClientCommands/CommandCloseTASession.cpp
49     ${DAEMON_PATH}/src/ClientCommands/CommandFinContext.cpp
50     ${DAEMON_PATH}/src/ClientCommands/CommandInitContext.cpp
51     ${DAEMON_PATH}/src/ClientCommands/CommandInvokeCommand.cpp
52     ${DAEMON_PATH}/src/ClientCommands/CommandInvokeTACommand.cpp
53     ${DAEMON_PATH}/src/ClientCommands/CommandOpenSession.cpp
54     ${DAEMON_PATH}/src/ClientCommands/CommandOpenTASession.cpp
55     ${DAEMON_PATH}/src/ClientCommands/CommandPanic.cpp
56     ${DAEMON_PATH}/src/ClientCommands/CommandRegSharedMem.cpp
57     ${DAEMON_PATH}/src/ClientCommands/CommandRelSharedMem.cpp
58     ${DAEMON_PATH}/src/ClientCommands/CommandReqCancellation.cpp
59     ${DAEMON_PATH}/src/ClientCommands/MakeCommand.cpp
60     ${DAEMON_PATH}/src/ResponseCommands/ResCommandCloseSession.cpp
61     ${DAEMON_PATH}/src/ResponseCommands/ResCommandInvokeCommand.cpp
62     ${DAEMON_PATH}/src/ResponseCommands/ResCommandOpenSession.cpp
63     ${DAEMON_PATH}/src/ResponseCommands/ResCommandReqCancellation.cpp
64     ${DAEMON_PATH}/src/ResponseCommands/ResMakeCommand.cpp
65     ${DAEMON_PATH}/src/TABinaryManager/TABinaryManager.cpp
66     ${DAEMON_PATH}/src/TABinaryManager/TAManifest.cpp
67     ${DAEMON_PATH}/src/TABinaryManager/TAUnpack.cpp
68     )
69
70 ADD_EXECUTABLE(${TARGET_TEF_SIMULATOR_DAEMON}
71     ${DAEMON_SOURCES}
72     )
73
74 ADD_DEPENDENCIES(${TARGET_TEF_SIMULATOR_DAEMON}
75     ${TARGET_TEF_SIMULATOR_OSAL}
76     ${TARGET_TEF_SIMULATOR_LOG}
77     )
78
79 INCLUDE_DIRECTORIES(
80     ${DAEMON_PATH}/inc
81     ${DAEMON_PATH}/inc/ClientCommands
82     ${DAEMON_PATH}/inc/ResponseCommands
83     # TODO move TABinaryManager headers to inc directory
84     ${DAEMON_PATH}/src/TABinaryManager/
85     ${TEF_SIMULATOR_INCLUDE_PATH}/include
86     ${LOG_PATH}
87     ${OSAL_PATH}
88     ${DAEMON_DEPS_INCLUDE_DIRS}
89     ${DAEMON_LIBTEEC_DEP_INCLUDE_DIRS}
90     )
91
92 LINK_DIRECTORIES(
93     ${LOG_PATH}
94     )
95
96 TARGET_LINK_LIBRARIES(${TARGET_TEF_SIMULATOR_DAEMON}
97     ${CMAKE_THREAD_LIBS_INIT}
98     ${DAEMON_DEPS_LIBRARIES}
99     ${TARGET_TEF_SIMULATOR_LOG}
100     ${TARGET_TEF_SIMULATOR_OSAL}
101     boost_system boost_filesystem
102     )
103
104 INSTALL(TARGETS ${TARGET_TEF_SIMULATOR_DAEMON} DESTINATION ${BIN_DIR})
105
106 INSTALL(DIRECTORY DESTINATION ${TASTORE_DIR})