Move wgt-backend implementation from app-installers
[platform/core/appfw/wgt-backend.git] / src / wgt / CMakeLists.txt
1 # Target - sources
2 SET(SRCS
3   rds_parser.cc
4   step/step_check_settings_level.cc
5   step/step_check_wgt_background_category.cc
6   step/step_create_symbolic_link.cc
7   step/step_encrypt_resources.cc
8   step/step_generate_xml.cc
9   step/step_parse.cc
10   step/step_remove_encryption_data.cc
11   step/step_parse_recovery.cc
12   step/step_rds_parse.cc
13   step/step_rds_modify.cc
14   step/step_wgt_create_icons.cc
15   step/step_wgt_create_storage_directories.cc
16   step/step_wgt_copy_storage_directories.cc
17   step/step_wgt_resource_directory.cc
18   step/step_add_default_privileges.cc
19   wgt_app_query_interface.cc
20   wgt_installer.cc
21 )
22
23 IF(WRT_LAUNCHER)
24     ADD_DEFINITIONS("-DWRT_LAUNCHER=\"${WRT_LAUNCHER}\"")
25     MESSAGE( "WRT LAUNCHER binary path is  set to ${WRT_LAUNCHER}")
26 ELSE(WRT_LAUNCHER)
27     MESSAGE(FATAL_ERROR, "WRT LAUNCHER binary path is not set")
28 ENDIF(WRT_LAUNCHER)
29
30 # Target - definition
31 ADD_LIBRARY(${TARGET_LIBNAME_WGT} STATIC ${SRCS})
32 ADD_EXECUTABLE(${TARGET_WGT_BACKEND} "wgt_backend.cc")
33 # Target - includes
34 TARGET_INCLUDE_DIRECTORIES(${TARGET_LIBNAME_WGT} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/../")
35 TARGET_INCLUDE_DIRECTORIES(${TARGET_WGT_BACKEND} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/../")
36 # Target - deps
37 APPLY_PKG_CONFIG(${TARGET_LIBNAME_WGT} PUBLIC
38   APP_INSTALLERS_DEPS
39   MANIFEST_HANDLERS_DEPS
40   MANIFEST_PARSER_DEPS
41   PKGMGR_INSTALLER_DEPS
42   ENCRYPTION_DEPS
43   Boost
44 )
45
46 # Target - in-package deps
47 TARGET_LINK_LIBRARIES(${TARGET_WGT_BACKEND} PRIVATE ${TARGET_LIBNAME_WGT})
48
49 # Install
50 INSTALL(TARGETS ${TARGET_LIBNAME_WGT} DESTINATION ${LIB_INSTALL_DIR})
51 INSTALL(TARGETS ${TARGET_WGT_BACKEND} DESTINATION ${BINDIR})