1 SET (this_target osp-system-server)
6 ${CMAKE_SOURCE_DIR}/inc
7 ${CMAKE_SOURCE_DIR}/src/app/inc
8 ${CMAKE_SOURCE_DIR}/src/base/inc
9 ${CMAKE_SOURCE_DIR}/src/system-server/inc
10 ${CMAKE_SOURCE_DIR}/src/io/inc
11 ${CMAKE_SOURCE_DIR}/src/server/inc
12 ${CMAKE_SOURCE_DIR}/src/system/inc
15 SET (${this_target}_SOURCE_FILES
16 system/FSys_SystemInfo.cpp
17 setting/FSys_SettingInfo.cpp
18 setting/providers/FSys_SettingApplicationProvider.cpp
19 setting/providers/FSys_SettingFontProvider.cpp
20 setting/providers/FSys_SettingGeneralProvider.cpp
21 setting/providers/FSys_SettingLocaleProvider.cpp
22 setting/providers/FSys_SettingLocationProvider.cpp
23 setting/providers/FSys_SettingNetworkProvider.cpp
24 setting/providers/FSys_SettingScreenProvider.cpp
25 setting/providers/FSys_SettingSoundProvider.cpp
26 setting/providers/FSys_SettingSpeechProvider.cpp
27 setting/providers/FSys_SettingStorageProvider.cpp
28 setting/providers/FSys_SettingVibrationProvider.cpp
29 setting/providers/FSys_Icu.cpp
32 INCLUDE(FindPkgConfig)
33 pkg_check_modules(system_pkgs REQUIRED
43 capi-media-sound-manager
44 capi-network-bluetooth
45 capi-network-tethering
50 capi-system-runtime-info
51 capi-system-system-settings
55 FOREACH(flag ${system_pkgs_CFLAGS})
56 SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
59 ## SET EXTRA COMPILER FLAGS
60 SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -fPIC -Wall" )
62 ## SET C COMPILER FLAGS
63 SET(CMAKE_C_FLAGS "${OSP_DEBUG_FLAGS} ${OSP_OPT_FLAGS} ${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} ${OSP_COMPILER_FLAGS}")
65 ## SET CPP COMPILER FLAGS
66 SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden")
67 SET(CMAKE_CXX_FLAGS "${OSP_DEBUG_FLAGS} ${OSP_OPT_FLAGS} ${CMAKE_CXX_FLAGS} ${EXTRA_CFLAGS} ${OSP_COMPILER_FLAGS}")
70 ADD_LIBRARY (${this_target} SHARED ${${this_target}_SOURCE_FILES})
72 SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined -Wl,--as-needed")
74 TARGET_LINK_LIBRARIES(${this_target} osp-appfw)
75 TARGET_LINK_LIBRARIES(${this_target} ${system_pkgs_LDFLAGS})
77 SET_TARGET_PROPERTIES(${this_target}
84 ADD_CUSTOM_COMMAND(TARGET ${this_target}
86 COMMAND ${CMAKE_COMMAND} -E copy ${LIBRARY_OUTPUT_PATH}/${CMAKE_SHARED_LIBRARY_PREFIX}${this_target}${CMAKE_SHARED_LIBRARY_SUFFIX} ${LIBRARY_OUTPUT_PATH}/debug/${CMAKE_SHARED_LIBRARY_PREFIX}${this_target}${CMAKE_SHARED_LIBRARY_SUFFIX}.${FULLVER}
87 COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_SHARED_LIBRARY_PREFIX}${this_target}${CMAKE_SHARED_LIBRARY_SUFFIX}.${FULLVER} ${LIBRARY_OUTPUT_PATH}/debug/${CMAKE_SHARED_LIBRARY_PREFIX}${this_target}${CMAKE_SHARED_LIBRARY_SUFFIX}.${MAJORVER}
88 COMMAND ${CMAKE_STRIP} --strip-unneeded ${LIBRARY_OUTPUT_PATH}/${CMAKE_SHARED_LIBRARY_PREFIX}${this_target}${CMAKE_SHARED_LIBRARY_SUFFIX}
89 COMMENT "strip ${this_target}"
92 SET(PC_NAME ${this_target})
93 SET(PC_REQUIRED ${pc_requires})
94 SET(PC_LDFLAGS -l${this_target})
95 SET(VERSION ${FULLVER})
98 CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/${this_target}.pc.in ${CMAKE_SOURCE_DIR}/${this_target}.pc @ONLY)