fix build error. 11/11311/1 accepted/tizen/20131024.065715 submit/tizen/20131024.065414
authorHokwon Song <hokwon.song@samsung.com>
Thu, 24 Oct 2013 06:52:23 +0000 (15:52 +0900)
committerHokwon Song <hokwon.song@samsung.com>
Thu, 24 Oct 2013 06:52:23 +0000 (15:52 +0900)
Change-Id: I6f229dabdc45df2bd1b01820989c62d3fb6ed204
Signed-off-by: Hokwon Song <hokwon.song@samsung.com>
CMakeLists.txt
src/ui/CMakeLists.txt

index 50bca8f..c7e0148 100644 (file)
@@ -7,27 +7,11 @@ SET(CMAKE_EXECUTABLE_SUFFIX ".exe")
 SET(EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_SOURCE_DIR}/output")
 
 INCLUDE_DIRECTORIES (
-       /usr/include/glib-2.0
-       /usr/lib/glib-2.0/include
-       /usr/include/ecore-1
-       /usr/include/eina-1
-       /usr/include/eina-1/eina
-       /usr/include/appfw
-       /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/ui
-       /usr/include/osp/server
-       /usr/include/chromium
-       /usr/include/osp/system-service/inc
-       /usr/include/osp/system-server/
        inc
 ##     src/messaging
        src/system
        src/ui
+       /usr/include/osp/system-server
        )
 
 SET (${this_target}_SOURCE_FILES
@@ -35,6 +19,22 @@ SET (${this_target}_SOURCE_FILES
        src/CommonServiceEntry.cpp
        )
 
+INCLUDE(FindPkgConfig)
+pkg_check_modules(${this_target} REQUIRED
+       glib-2.0
+       ecore
+       eina
+       chromium
+       libsmack
+       capi-appfw-application
+       osp-appfw
+       osp-appfw-server
+       osp-system-server
+)
+
+FOREACH(flag ${${this_target}_CFLAGS})
+       SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
+ENDFOREACH(flag)
 ##ADD_SUBDIRECTORY(src/messaging)
 ADD_SUBDIRECTORY(src/system)
 ADD_SUBDIRECTORY(src/ui)
@@ -81,19 +81,18 @@ SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined -
 TARGET_LINK_LIBRARIES( ${this_target} ${STATIC_LIBS})
 
 TARGET_LINK_LIBRARIES(${this_target} -Xlinker --no-undefined -Xlinker --as-needed -pie)
-TARGET_LINK_LIBRARIES(${this_target} "-L/usr/lib/osp -losp-appfw -lchromium")
 TARGET_LINK_LIBRARIES(${this_target} "-L/usr/lib/osp -losp-uifw" )
 TARGET_LINK_LIBRARIES(${this_target} -L/usr/lib/osp -losp-messaging)
-TARGET_LINK_LIBRARIES(${this_target} "-lcapi-appfw-application" )
 TARGET_LINK_LIBRARIES(${this_target} "-lmsg_mapi" )
 TARGET_LINK_LIBRARIES(${this_target} "-lutilX" )
 TARGET_LINK_LIBRARIES(${this_target} "-lecore_x" )
 TARGET_LINK_LIBRARIES(${this_target} "-ltapi" )
 TARGET_LINK_LIBRARIES(${this_target} "-lcapi-system-info" )
 TARGET_LINK_LIBRARIES(${this_target} "-lcapi-network-wifi" )
-TARGET_LINK_LIBRARIES(${this_target} "-L/usr/lib/osp-server -losp-appfw-server")
-TARGET_LINK_LIBRARIES(${this_target} "-L/usr/lib/osp-server -losp-system-server")
+##TARGET_LINK_LIBRARIES(${this_target} "-L/usr/lib/osp-server -losp-appfw-server")
+##TARGET_LINK_LIBRARIES(${this_target} "-L/usr/lib/osp-server -losp-system-server")
 TARGET_LINK_LIBRARIES(${this_target} "-ldl")
+TARGET_LINK_LIBRARIES(${this_target} ${${this_target}_LDFLAGS} ${${this_target}_LIBRARIES})
 
 INSTALL(TARGETS ${this_target} DESTINATION ../usr/apps/${APPID}/bin)
 INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/manifest.xml DESTINATION ../usr/apps/${APPID}/info)
index f9530bb..bcb6a3a 100644 (file)
@@ -3,6 +3,7 @@ SET (this_target ui_service)
 INCLUDE_DIRECTORIES(
        ${SLP_INCLUDE_DIRS}
        ${CMAKE_SOURCE_DIR}/inc
+       /usr/include/osp/ui
        ./
        )