SET(dependents "dlog iniparser")
INCLUDE(FindPkgConfig)
-pkg_check_modules(${fw_name_common} REQUIRED ${dependents})
-FOREACH(flag ${${fw_name_common}_CFLAGS})
- SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
- SET(EXTRA_CXXFLAGS "${EXTRA_CXXFLAGS} ${flag}")
-ENDFOREACH(flag)
-
-SET(CMAKE_C_FLAGS "-I./include -I./include/headers ${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC -Wall")
-SET(CMAKE_C_FLAGS_DEBUG "-O0 -g")
-
-SET(CMAKE_CXX_FLAGS "-I./include -I./include/headers ${CMAKE_CXX_FLAGS} ${EXTRA_CXXFLAGS} -fPIC")
-SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -g")
-
-ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
-ADD_DEFINITIONS("-DTIZEN_DEBUG")
-
-SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=${LIB_INSTALL_DIR}")
+pkg_check_modules(${fw_name_common}_DEP REQUIRED ${dependents})
#common
aux_source_directory(src SOURCES)
ADD_LIBRARY(${fw_name_common} SHARED ${SOURCES})
-TARGET_LINK_LIBRARIES(${fw_name_common} dlog iniparser stdc++fs)
+TARGET_INCLUDE_DIRECTORIES(${fw_name_common} PUBLIC include ${${fw_name_common}_DEP_INCLUDE_DIRS})
+TARGET_LINK_LIBRARIES(${fw_name_common} ${${fw_name_common}_DEP_LIBRARIES} stdc++fs)
SET_TARGET_PROPERTIES(${fw_name_common}
PROPERTIES