From: Young Ik Cho Date: Mon, 25 Mar 2013 05:32:41 +0000 (+0900) Subject: use pkgconfig for dependency X-Git-Tag: accepted/tizen_2.1/20130425.034849~222 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=30666a1123a3e071bd8e5c75f25d18b81d287bb7;p=framework%2Fosp%2Fappfw.git use pkgconfig for dependency Change-Id: I1dbdca04c721a9ec3ddd2bb30dc987f5b9480a55 Signed-off-by: Young Ik Cho --- diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 9d06cf4..0a2b553 100755 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,34 +1,51 @@ -SET(SLP_INCLUDE_DIRS - /usr/include - /usr/include/vconf - /usr/include/glib-2.0 - /usr/lib/glib-2.0/include - /usr/include/dbus-1.0 - /usr/lib/dbus-1.0/include - /usr/include/dlog - /usr/include/appfw - /usr/include/aul - /usr/include/notification - /usr/include/heynoti - /usr/include/devman - /usr/include/network - /usr/include/libxml2 - /usr/include/content - /usr/include/system - /usr/include/libsoup-2.4 - /usr/include/pkgmgr - /usr/include/curl - /usr/include/minizip - /usr/include/chromium - /usr/include/drm-intel - /usr/include/haptic - /usr/include/ecore-1 - /usr/include/eina-1 - /usr/include/eina-1/eina + +INCLUDE(FindPkgConfig) +pkg_check_modules(pkgs REQUIRED + alarm-service + aul + appsvc + bundle + chromium + dbus-1 + dbus-glib-1 + devman + dlog + drm-service-core-intel + ecore + glib-2.0 + haptic + heynoti + icu-i18n + libcurl + libpcre + libsoup-2.4 + libwbxml2 + message-port + minizip + notification + pmapi + pkgmgr + pkgmgr-info + sqlite3 + uuid + vconf + zlib + capi-appfw-app-manager + capi-appfw-application + capi-appfw-package-manager + capi-content-mime-type + capi-network-serial + capi-system-runtime-info + capi-system-device + capi-system-power ) +FOREACH(flag ${pkgs_CFLAGS}) + SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") +ENDFOREACH(flag) + + ## Add SubModules -ADD_SUBDIRECTORY(osp-string) ADD_SUBDIRECTORY(newlib-compat) ADD_SUBDIRECTORY(app) ADD_SUBDIRECTORY(io) @@ -38,4 +55,5 @@ ADD_SUBDIRECTORY(security) ADD_SUBDIRECTORY(system) ADD_SUBDIRECTORY(text) ADD_SUBDIRECTORY(appfw) +ADD_SUBDIRECTORY(osp-string) ADD_SUBDIRECTORY(server osp-appfw-server) diff --git a/src/appfw/CMakeLists.txt b/src/appfw/CMakeLists.txt index 0bcb50e..0fea949 100644 --- a/src/appfw/CMakeLists.txt +++ b/src/appfw/CMakeLists.txt @@ -44,45 +44,14 @@ OSP_ADD_OBJS_IN_ARCHIVE(${STATIC_LIBS}) SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined -Wl,--as-needed") TARGET_LINK_LIBRARIES( ${this_target} ${STATIC_LIBS}) -TARGET_LINK_LIBRARIES(${this_target} "-lchromium" ) -TARGET_LINK_LIBRARIES(${this_target} "-lminizip" ) -TARGET_LINK_LIBRARIES(${this_target} "-lcapi-appfw-application" ) -TARGET_LINK_LIBRARIES(${this_target} "-lcapi-appfw-app-manager" ) -TARGET_LINK_LIBRARIES(${this_target} "-lcapi-appfw-package-manager" ) -TARGET_LINK_LIBRARIES(${this_target} "-lcapi-content-mime-type" ) -TARGET_LINK_LIBRARIES(${this_target} "-lcapi-system-runtime-info") -TARGET_LINK_LIBRARIES(${this_target} "-lappsvc" ) -TARGET_LINK_LIBRARIES(${this_target} "-laul" ) -TARGET_LINK_LIBRARIES(${this_target} "-lbundle" ) -TARGET_LINK_LIBRARIES(${this_target} "-lcrypto" ) -TARGET_LINK_LIBRARIES(${this_target} "-ldevman" ) -TARGET_LINK_LIBRARIES(${this_target} "-ldbus-1" ) -TARGET_LINK_LIBRARIES(${this_target} "-ldbus-glib-1" ) TARGET_LINK_LIBRARIES(${this_target} "-ldl" ) -TARGET_LINK_LIBRARIES(${this_target} "-ldlog" ) -TARGET_LINK_LIBRARIES(${this_target} "-lglib-2.0" ) -TARGET_LINK_LIBRARIES(${this_target} "-lheynoti" ) -TARGET_LINK_LIBRARIES(${this_target} "-licui18n" ) -TARGET_LINK_LIBRARIES(${this_target} "-licuuc" ) -TARGET_LINK_LIBRARIES(${this_target} "-lmessage-port" ) -TARGET_LINK_LIBRARIES(${this_target} "-lnotification" ) -TARGET_LINK_LIBRARIES(${this_target} "-lpcre" ) -TARGET_LINK_LIBRARIES(${this_target} "-lpkgmgr-client" ) -TARGET_LINK_LIBRARIES(${this_target} "-lpkgmgr-info" ) -TARGET_LINK_LIBRARIES(${this_target} "-lpmapi" ) TARGET_LINK_LIBRARIES(${this_target} "-lpthread" ) TARGET_LINK_LIBRARIES(${this_target} "-lrt" ) -TARGET_LINK_LIBRARIES(${this_target} "-lsqlite3" ) -TARGET_LINK_LIBRARIES(${this_target} "-luuid" ) -TARGET_LINK_LIBRARIES(${this_target} "-lvconf" ) -TARGET_LINK_LIBRARIES(${this_target} "-lxml2" ) -TARGET_LINK_LIBRARIES(${this_target} "-lz" ) #TARGET_LINK_LIBRARIES(${this_target} "-ldukgenerator" ) #TARGET_LINK_LIBRARIES(${this_target} "-lcryptsvc" ) TARGET_LINK_LIBRARIES(${this_target} "-lalarm" ) -TARGET_LINK_LIBRARIES(${this_target} "-L/usr/lib -ldrm-service-core-intel") -TARGET_LINK_LIBRARIES(${this_target} "-lecore" ) TARGET_LINK_LIBRARIES(${this_target} "-lprivacy-manager-client" ) +TARGET_LINK_LIBRARIES(${this_target} ${pkgs_LDFLAGS}) SET_TARGET_PROPERTIES(${this_target} diff --git a/src/system/CMakeLists.txt b/src/system/CMakeLists.txt index c5a8410..6b9d0c6 100755 --- a/src/system/CMakeLists.txt +++ b/src/system/CMakeLists.txt @@ -11,8 +11,6 @@ INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR}/src/locales/inc ${CMAKE_SOURCE_DIR}/src/app/inc ${CMAKE_SOURCE_DIR}/src/security/inc - ${CMAKE_SOURCE_DIR}/src/io/ext/chromium - /usr/include/network ) INCLUDE(FindPkgConfig) @@ -67,9 +65,3 @@ SET(CMAKE_CXX_FLAGS "${OSP_DEBUG_FLAGS} ${OSP_OPT_FLAGS} ${CMAKE_CXX_FLAGS} ${EX ## Create Library ADD_LIBRARY (${this_target} STATIC ${${this_target}_SOURCE_FILES}) -## SET LINKER FLAGS -SET(CMAKE_SHARED_LINKER_FLAGS -Wl, --no-undefined) - -TARGET_LINK_LIBRARIES(${this_target} ${pkgs_LDFLAGS}) -TARGET_LINK_LIBRARIES(${this_target} "-lcapi-system-device") -TARGET_LINK_LIBRARIES(${this_target} "-lcapi-system-power")