From: Hyunwoo Kim Date: Mon, 9 Sep 2013 02:32:33 +0000 (+0900) Subject: Modify CMake file for using pkgconfig X-Git-Tag: submit/tizen_2.2/20131107.062105~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=33bf66a4711a16ac522db6bc420d8678fc82cd90;p=framework%2Fosp%2Fsecure-element.git Modify CMake file for using pkgconfig Change-Id: I74a640e7587c2b12d25fd4fc6182eb7f754fb2e8 Signed-off-by: Hyunwoo Kim --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 5734e7a..944471b 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,10 +2,14 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.6) SET (this_target osp-secure-element) +INCLUDE(FindPkgConfig) +pkg_check_modules(${this_target} REQUIRED osp-appfw smartcard-service smartcard-service-common) + SET(LIBRARY_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/cmake_build_tmp/output) INCLUDE_DIRECTORIES( ${SLP_INCLUDE_DIRS} + ${${this_target}_INCLUDE_DIRS}} inc src src/inc @@ -61,9 +65,7 @@ ADD_LIBRARY (${this_target} SHARED ${${this_target}_SOURCE_FILES}) ## SET LINKER FLAGS SET(CMAKE_SHARED_LINKER_FLAGS -Wl,--no-undefined) -TARGET_LINK_LIBRARIES(${this_target} "-lsmartcard-service" ) -TARGET_LINK_LIBRARIES(${this_target} "-lsmartcard-service-common" ) -TARGET_LINK_LIBRARIES(${this_target} "-L/usr/lib/osp -losp-appfw" ) +TARGET_LINK_LIBRARIES(${this_target} ${${this_target}_LDFLAGS} ${${this_target}_LIBRARIES} ) SET_TARGET_PROPERTIES(${this_target} PROPERTIES