1 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
3 SET (this_target osp-appwidget-service)
4 SET (PACKAGEID gi2qxenosh)
6 SET(CMAKE_EXECUTABLE_SUFFIX ".exe")
7 SET(EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_SOURCE_DIR}/output")
10 pkg_check_modules(${this_target} REQUIRED
13 capi-appfw-application
22 ${${this_target}_INCLUDE_DIRS}
26 FOREACH(flag ${this_target_CFLAGS})
27 SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
30 SET (${this_target}_SOURCE_FILES
31 src/OspAppWidgetService.cpp
32 src/OspAppWidgetServiceEntry.cpp
33 src/FShell_AppContext.cpp
34 src/FShell_AppWidgetContext.cpp
35 src/FShell_AppWidgetRemoteBuffer.cpp
36 src/FShell_AppWidgetManagerService.cpp
37 src/FShell_AppWidgetManagerStub.cpp
38 src/FShell_AppWidgetPopupContext.cpp
39 src/FShell_AppWidgetContextHelper.cpp
42 ## SET EXTRA COMPILER FLAGS
43 SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -fPIE -Wall -pthread -g3" )
44 #SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -fstack-protector -Wstack-protector" )
46 ## SET C COMPILER FLAGS
47 SET(CMAKE_C_FLAGS "${OSP_DEBUG_FLAGS} ${OSP_OPT_FLAGS} ${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} ${OSP_COMPILER_FLAGS}")
49 ## SET CPP COMPILER FLAGS
50 SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden")
51 SET(CMAKE_CXX_FLAGS "${OSP_DEBUG_FLAGS} ${OSP_OPT_FLAGS} ${CMAKE_CXX_FLAGS} ${EXTRA_CFLAGS} ${OSP_COMPILER_FLAGS}")
53 SET(CMAKE_SKIP_BUILD_RPATH FALSE)
54 SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
55 SET(CMAKE_INSTALL_RPATH "/usr/lib/osp-server")
56 SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE)
59 ADD_EXECUTABLE (${this_target} ${${this_target}_SOURCE_FILES})
60 TARGET_LINK_LIBRARIES(${this_target} -Xlinker --no-undefined -Xlinker --as-needed -pie)
61 TARGET_LINK_LIBRARIES(${this_target} -Xlinker --version-script=${CMAKE_CURRENT_SOURCE_DIR}/system-service-export.ver)
62 TARGET_LINK_LIBRARIES(${this_target} ${${this_target}_LDFLAGS} ${${this_target}_LIBRARIES})
64 ## Cory additional info
65 INSTALL(TARGETS ${this_target} DESTINATION ../usr/apps/${PACKAGEID}/bin)
66 INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/manifest.xml DESTINATION ../usr/apps/${PACKAGEID}/info)
67 INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/data DESTINATION ../usr/apps/${PACKAGEID})
68 INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/data/ DESTINATION ../usr/apps/${PACKAGEID}/data FILES_MATCHING PATTERN "*.ini")