use pkgconfig to improve pkg dependency mgmt.
authorjungmin76.park <jungmin76.park@samsung.com>
Mon, 14 Oct 2013 07:05:17 +0000 (16:05 +0900)
committerjungmin76.park <jungmin76.park@samsung.com>
Mon, 14 Oct 2013 07:05:17 +0000 (16:05 +0900)
Change-Id: I22c203f6d19df3b73e5c87399083254a191d3c59
Signed-off-by: jungmin76.park <jungmin76.park@samsung.com>
CMakeLists.txt
packaging/osp-appwidget-service.spec

index 2420719..4fc5a58 100644 (file)
@@ -6,21 +6,18 @@ SET (PACKAGEID gi2qxenosh)
 SET(CMAKE_EXECUTABLE_SUFFIX ".exe")
 SET(EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_SOURCE_DIR}/output")
 
+INCLUDE(FindPkgConfig)
+       pkg_check_modules(${this_target} REQUIRED
+       glib-2.0
+       provider
+       osp-appfw
+       osp-appfw-server
+       osp-shell
+       )
+
+
 INCLUDE_DIRECTORIES (
-       /usr/include/glib-2.0
-       /usr/lib/glib-2.0/include
-       /usr/include/provider
-       /usr/include/appfw
-       /usr/include/aul
-       /usr/include/osp
-       /usr/include/osp/app
-       /usr/include/osp/base
-       /usr/include/osp/io
-       /usr/include/osp/system
-       /usr/include/osp/security
-       /usr/include/osp/shell
-       /usr/include/osp/server
-       /usr/include/chromium
+       ${${this_target}_INCLUDE_DIRS}
        inc
        )
 
@@ -54,12 +51,7 @@ SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE)
 
 ## Create Library
 ADD_EXECUTABLE (${this_target} ${${this_target}_SOURCE_FILES})
-
-TARGET_LINK_LIBRARIES(${this_target} -Xlinker --no-undefined -Xlinker --as-needed -pie)
-TARGET_LINK_LIBRARIES(${this_target} -Xlinker --version-script=${CMAKE_CURRENT_SOURCE_DIR}/system-service-export.ver)
-TARGET_LINK_LIBRARIES(${this_target} "-L/usr/lib/osp -losp-appfw -lchromium -lprovider -losp-shell")
-TARGET_LINK_LIBRARIES(${this_target} "-L/usr/lib/osp-server -losp-appfw-server")
-
+TARGET_LINK_LIBRARIES(${this_target} ${${this_target}_LDFLAGS} ${${this_target}_LIBRARIES})
 
 ## Cory additional info
 INSTALL(TARGETS ${this_target} DESTINATION ../usr/apps/${PACKAGEID}/bin)
index a4564e1..8c47f01 100755 (executable)
@@ -1,6 +1,6 @@
-Name:  osp-appwidget-service
+Name:          osp-appwidget-service
 Summary:       osp appwidget service
-Version:       1.2.2.0
+Version:       1.2.2.1
 Release:       2
 Group:         System/Libraries
 License:       Flora
@@ -12,11 +12,10 @@ BuildRequires:  pkgconfig(aul)
 BuildRequires:  pkgconfig(glib-2.0)
 BuildRequires:  pkgconfig(provider)
 BuildRequires:  pkgconfig(osp-appfw)
+BuildRequires:  pkgconfig(osp-appfw-server)
 BuildRequires:  pkgconfig(osp-uifw)
 BuildRequires:  pkgconfig(osp-image)
 BuildRequires:  pkgconfig(osp-shell)
-BuildRequires:  osp-shell-internal-devel
-BuildRequires:  osp-appfw-internal-devel
 BuildRequires:  hash-signer
 
 # runtime requires