endif()
INCLUDE(FindPkgConfig)
-pkg_check_modules(pkgs REQUIRED ${PKG_MODULES})
-FOREACH(flag ${pkgs_CFLAGS})
+pkg_check_modules(${PROJECT_NAME} REQUIRED ${PKG_MODULES})
+FOREACH(flag ${${PROJECT_NAME}_CFLAGS})
SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
ENDFOREACH(flag)
src/plugin-api-conf.c)
ADD_LIBRARY(${PROJECT_NAME} SHARED ${SRCS})
-TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS}
+TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${${PROJECT_NAME}_LDFLAGS}
-ldl -Wl,-z,nodelete,--no-undefined)
SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES SOVERSION ${PLUGIN_API_COMMON_MAJORVER})
SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES VERSION ${VERSION})
FILES_MATCHING PATTERN "*.h")
# CONFIGURE .pc FILE
-FOREACH(include_dirs ${pkgs_INCLUDE_DIRS})
+FOREACH(include_dirs ${${PROJECT_NAME}_INCLUDE_DIRS})
SET(PLUGIN_COMMON_INCLUDEDIR "${PLUGIN_COMMON_INCLUDEDIR} -I${include_dirs}")
ENDFOREACH(include_dirs)
-FOREACH(libraries ${pkgs_LIBRARIES})
+FOREACH(libraries ${${PROJECT_NAME}_LIBRARIES})
SET(PLUGIN_COMMON_LIBS "${PLUGIN_COMMON_LIBS} -l${libraries}")
ENDFOREACH(libraries)
CONFIGURE_FILE(${PROJECT_NAME}.pc.in ${PROJECT_NAME}.pc @ONLY)
../common/src/plugin-api-conf.c)
ADD_LIBRARY(${PROJECT_NAME} SHARED ${SRCS})
-TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS}
+TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${${PROJECT_NAME}_LDFLAGS}
-ldl -Wl,-z,nodelete,--no-undefined)
SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES VERSION ${PLUGIN_API_RESOURCED_VERSION})
)
# CONFIGURE .pc FILE
-FOREACH(include_dirs ${pkgs_INCLUDE_DIRS})
+FOREACH(include_dirs ${${PROJECT_NAME}_INCLUDE_DIRS})
SET(PLUGIN_RESOURCED_INCLUDEDIR "${PLUGIN_RESOURCED_INCLUDEDIR} -I${include_dirs}")
ENDFOREACH(include_dirs)
-FOREACH(libraries ${pkgs_LIBRARIES})
+FOREACH(libraries ${${PROJECT_NAME}_LIBRARIES})
SET(PLUGIN_RESOURCED_LIBS "${PLUGIN_RESOURCED_LIBS} -l${libraries}")
ENDFOREACH(libraries)
CONFIGURE_FILE(${PROJECT_NAME}.pc.in ${PROJECT_NAME}.pc @ONLY)