# # Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # SET(SERVER_SRCS main.cpp server.cpp launchpad.cpp ext4-tool.cpp app-bundle.cpp file-footer.cpp secure-erase.cpp progress-bar.cpp block-device.cpp kernel-keyring.cpp internal-encryption.cpp external-encryption.cpp engine/ext4-engine.cpp engine/dmcrypt-engine.cpp engine/ecryptfs-engine.cpp key-manager/key-store.cpp key-manager/key-manager.cpp key-manager/key-generator.cpp key-manager/anti-forensics.cpp ) SET(DEPENDENCY klay glib-2.0 gio-2.0 aul bundle libtzplatform-config cynara-client cynara-session openssl ) SET(SERVER_NAME ${PROJECT_NAME}d) ADD_EXECUTABLE(${SERVER_NAME} ${SERVER_SRCS}) PKG_CHECK_MODULES(SERVER_DEPS REQUIRED ${DEPENDENCY}) INCLUDE_DIRECTORIES(SYSTEM ${SERVER_DEPS_INCLUDE_DIRS} ${ODE_SERVER} ${PROJECT_SOURCE_DIR}) TARGET_LINK_LIBRARIES(${SERVER_NAME} ${SERVER_DEPS_LIBRARIES} pthread) SET_TARGET_PROPERTIES(${SERVER_NAME} PROPERTIES COMPILE_FLAGS "-fPIE") SET_TARGET_PROPERTIES(${SERVER_NAME} PROPERTIES LINK_FLAGS "-pie") TARGET_COMPILE_DEFINITIONS(${SERVER_NAME} PRIVATE RUN_PATH="${RUN_DIR}" ICON_PATH="${ICON_DIR}" ) CONFIGURE_FILE(systemd/${PROJECT_NAME}.service.in systemd/${PROJECT_NAME}.service) INSTALL(TARGETS ${SERVER_NAME} DESTINATION ${BIN_DIR}) INSTALL(FILES systemd/${PROJECT_NAME}.service DESTINATION ${SYSTEMD_UNIT_DIR})