SET (this_target osp-nfc)
+INCLUDE(FindPkgConfig)
+pkg_check_modules(${this_target} REQUIRED glib-2.0 capi-network-nfc osp-net osp-appfw chromium)
+
SET(LIBRARY_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/cmake_build_tmp/output)
INCLUDE_DIRECTORIES(
inc
src
src/inc
- /usr/include/chromium
- /usr/include/glib-2.0
- /usr/lib/glib-2.0/include
- /usr/include/system
- /usr/include/network
- /usr/include/osp
- /usr/include/osp/app
- /usr/include/osp/base
- /usr/include/osp/io
- /usr/include/osp/net
- /usr/include/osp/security
- /usr/include/osp/system
+ ${${this_target}_INCLUDE_DIRS}
)
SET (${this_target}_SOURCE_FILES
## SET LINKER FLAGS
SET(CMAKE_SHARED_LINKER_FLAGS -Wl,--no-undefined)
-TARGET_LINK_LIBRARIES(${this_target} "-lchromium" )
-TARGET_LINK_LIBRARIES(${this_target} "-L/usr/lib/osp -losp-appfw -losp-net" )
-TARGET_LINK_LIBRARIES(${this_target} "-lcapi-network-nfc" )
TARGET_LINK_LIBRARIES(${this_target} "-lpthread" )
+TARGET_LINK_LIBRARIES(${this_target} ${${this_target}_LDFLAGS} ${${this_target}_LIBRARIES})
+
SET_TARGET_PROPERTIES(${this_target}
PROPERTIES
VERSION ${FULLVER}
INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/src/inc/ DESTINATION include/osp/net FILES_MATCHING PATTERN "*.h")
# pkgconfig file
+SET(PC_LDFLAGS -l${this_target})
CONFIGURE_FILE(${this_target}.pc.in ${CMAKE_SOURCE_DIR}/${this_target}.pc @ONLY)
INSTALL(FILES ${CMAKE_SOURCE_DIR}/${this_target}.pc DESTINATION lib/pkgconfig)