Add vconf linking 09/153209/2 accepted/tizen/unified/20170928.150107 submit/tizen/20170928.055807
authorWonyoung Choi <wy80.choi@samsung.com>
Thu, 28 Sep 2017 05:36:31 +0000 (14:36 +0900)
committerJongHeon Choi <j-h.choi@samsung.com>
Thu, 28 Sep 2017 05:45:33 +0000 (05:45 +0000)
Change-Id: Ia52dd7bb3e140cd00936f251fd93bd60eb2f3957

CMakeLists.txt
packaging/capi-base-common.spec
src/tizen_dotnet.c

index 706ab3a..b6f8dbc 100644 (file)
@@ -9,11 +9,15 @@ SET(PC_LDFLAGS -l${fw_name})
 
 SET(INC_DIR "include")
 
+INCLUDE(FindPkgConfig)
+PKG_CHECK_MODULES(${fw_name} REQUIRED vconf)
+
 INSTALL(FILES ${INC_DIR}/tizen.h DESTINATION ${INCLUDE_INSTALL_DIR})
 INSTALL(FILES ${INC_DIR}/tizen_type.h DESTINATION ${INCLUDE_INSTALL_DIR})
 INSTALL(FILES ${INC_DIR}/tizen_error.h DESTINATION ${INCLUDE_INSTALL_DIR})
 INSTALL(FILES ${INC_DIR}/tizen_dotnet.h DESTINATION ${INCLUDE_INSTALL_DIR})
-INCLUDE_DIRECTORIES(${INC_DIR})
+
+INCLUDE_DIRECTORIES(${INC_DIR} ${${fw_name}_INCLUDE_DIRS})
 
 INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/capi-base-common.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
 
@@ -25,6 +29,8 @@ SET(SOURCES
 ADD_LIBRARY(${fw_name} SHARED ${SOURCES})
 SET_TARGET_PROPERTIES(${fw_name} PROPERTIES VERSION ${FULLVER})
 SET_TARGET_PROPERTIES(${fw_name} PROPERTIES SOVERSION 0)
+TARGET_LINK_LIBRARIES(${fw_name} ${${fw_name}_LDFLAGS})
+
 INSTALL(TARGETS ${fw_name} DESTINATION ${LIB_INSTALL_DIR})
 CONFIGURE_FILE(${fw_name}.pc.in ${fw_name}.pc @ONLY)
 
@@ -32,10 +38,10 @@ IF(UNIX)
 
 ADD_CUSTOM_TARGET (distclean @echo cleaning for source distribution)
 ADD_CUSTOM_COMMAND(
-        DEPENDS clean 
+        DEPENDS clean
         COMMENT "distribution clean"
         COMMAND find
-        ARGS    . 
+        ARGS    .
         -not -name config.cmake -and \(
         -name tester.c -or
         -name Testing -or
index 9e39ef4..54bffc5 100644 (file)
@@ -6,7 +6,9 @@ Group:      Base
 License:    Apache-2.0
 Source0:    %{name}-%{version}.tar.gz
 
-BuildRequires:    cmake
+BuildRequires: cmake
+BuildRequires: pkgconfig(vconf)
+
 Requires(post):   /sbin/ldconfig
 Requires(postun): /sbin/ldconfig
 
index f334e16..f5a3602 100644 (file)
@@ -14,7 +14,8 @@
  * limitations under the License.
  */
 
-#include "tizen_dotnet.h"
+#include <tizen_dotnet.h>
+#include <vconf.h>
 
 int dotnet_util_get_tizen_api_version(int *version)
 {