Apply pkgs config for haptic
authorHokwon Song <hokwon.song@samsung.com>
Fri, 22 Mar 2013 08:32:54 +0000 (17:32 +0900)
committerHokwon Song <hokwon.song@samsung.com>
Fri, 22 Mar 2013 08:35:01 +0000 (17:35 +0900)
Change-Id: I1f4edcace4401c6ee01fbad14c5cf84812c9a48f
Signed-off-by: Hokwon Song <hokwon.song@samsung.com>
src/system/CMakeLists.txt

index 1dac104..c5a8410 100755 (executable)
@@ -15,6 +15,15 @@ INCLUDE_DIRECTORIES(
        /usr/include/network
        )
 
+INCLUDE(FindPkgConfig)
+pkg_check_modules(pkgs REQUIRED
+       haptic
+)
+
+FOREACH(flag ${pkgs_CFLAGS})
+       SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
+ENDFOREACH(flag)
+
 SET (${this_target}_SOURCE_FILES
        FSys_CommunicationDispatcherClient.cpp
        FSys_AlarmManager.cpp
@@ -61,6 +70,6 @@ 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} "-lhaptic")
+TARGET_LINK_LIBRARIES(${this_target} ${pkgs_LDFLAGS})
 TARGET_LINK_LIBRARIES(${this_target} "-lcapi-system-device")
 TARGET_LINK_LIBRARIES(${this_target} "-lcapi-system-power")