1 # Copyright (c) 2011 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 # @file CMakeLists.txt
17 # @author Andrzej Surdej (a.surdej@samsung.com)
21 SET(TARGET_PLUGINS_INSTALLER "wrt-plugins-installer")
23 SET(WRT_PLUGINS_INSTALLER_SRC_DIR
24 ${CMAKE_CURRENT_SOURCE_DIR}
27 PKG_CHECK_MODULES(PLUGINS_INSTALLER_DEPS
38 ${WRT_PLUGINS_INSTALLER_SRC_DIR}
39 ${PLUGINS_INSTALLER_INCLUDES}
40 ${PLUGINS_INSTALLER_DEPS_INCLUDE_DIRS}
41 ${PLUGINS_API_SUPPORT_DIRS}
44 SET(WRT_PLUGINS_INSTALLER_SOURCES
45 ${WRT_PLUGINS_INSTALLER_SRC_DIR}/wrt_plugins_installer.cpp
46 ${WRT_PLUGINS_INSTALLER_SRC_DIR}/plugin_installer.cpp
47 ${WRT_PLUGINS_INSTALLER_SRC_DIR}/plugin_utils.cpp
48 ${WRT_PLUGINS_INSTALLER_SRC_DIR}/plugin_objects.cpp
49 ${WRT_PLUGINS_INSTALLER_SRC_DIR}/plugin_metafile_reader.cpp
52 ADD_DEFINITIONS(${PLUGINS_INSTALLER_DEPS_CFLAGS})
53 ADD_DEFINITIONS(${PLUGINS_INSTALLER_DEPS_CFLAGS_OTHERS})
55 ADD_EXECUTABLE(${TARGET_PLUGINS_INSTALLER}
56 ${WRT_PLUGINS_INSTALLER_SOURCES}
59 TARGET_LINK_LIBRARIES(${TARGET_PLUGINS_INSTALLER}
60 ${PLUGINS_INSTALLER_DEPS_LIBRARIES}
61 ${TARGET_PLUGINS_API_SUPPORT} "-ldl"
64 SET_TARGET_PROPERTIES(${TARGET_PLUGINS_INSTALLER} PROPERTIES
65 LINK_FLAGS "-Wl,--as-needed -Wl,--hash-style=both"
66 BUILD_WITH_INSTALL_RPATH ON
67 INSTALL_RPATH_USE_LINK_PATH ON
70 INSTALL(TARGETS ${TARGET_PLUGINS_INSTALLER} DESTINATION bin)