1 # Copyright (c) 2017 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.
16 # @author Lukasz Kostyra (l.kostyra@samsung.com)
17 # @brief CMakeLists for tef-simulator daemon unit
20 PKG_CHECK_MODULES(DAEMON_DEPS REQUIRED
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
35 FIND_PACKAGE(Threads REQUIRED)
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
70 ADD_EXECUTABLE(${TARGET_TEF_SIMULATOR_DAEMON}
74 ADD_DEPENDENCIES(${TARGET_TEF_SIMULATOR_DAEMON}
75 ${TARGET_TEF_SIMULATOR_OSAL}
76 ${TARGET_TEF_SIMULATOR_LOG}
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
88 ${DAEMON_DEPS_INCLUDE_DIRS}
89 ${DAEMON_LIBTEEC_DEP_INCLUDE_DIRS}
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
104 INSTALL(TARGETS ${TARGET_TEF_SIMULATOR_DAEMON} DESTINATION ${BIN_DIR})
106 INSTALL(DIRECTORY DESTINATION ${TASTORE_DIR})