SET(EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_SOURCE_DIR}/output")
INCLUDE_DIRECTORIES (
- /usr/include/glib-2.0
- /usr/lib/glib-2.0/include
- /usr/include/osp
- /usr/include/osp/app
- /usr/include/osp/base
- /usr/include/osp/io
- /usr/include/chromium
- /usr/include/osp/security
- /usr/include/osp/server
- /usr/include
- /usr/include/vconf
inc
)
+
+INCLUDE(FindPkgConfig)
+pkg_check_modules(pkgs REQUIRED
+ osp-appfw-server
+ chromium
+ glib-2.0
+ osp-appfw
+ vconf
+)
+
+FOREACH(flag ${pkgs_CFLAGS})
+ SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
+ENDFOREACH(flag)
+
SET (${this_target}_SOURCE_FILES
src/SecurityService.cpp
src/SecurityServiceEntry.cpp
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)
-TARGET_LINK_LIBRARIES(${this_target} "-L/usr/lib/osp-server -losp-appfw-server")
-TARGET_LINK_LIBRARIES(${this_target} "-lvconf" )
TARGET_LINK_LIBRARIES(${this_target} "-ldl" )
+TARGET_LINK_LIBRARIES(${this_target} ${pkgs_LDFLAGS})
## Copy additional info
INSTALL(TARGETS ${this_target} DESTINATION ../usr/apps/${APPID}/bin)