cmake.backbone/ValaPluginCommonRules.cmake

18 lines
700 B
CMake

INCLUDE (FindVala)
INCLUDE (UseVala)
INCLUDE (CFlagsCommonRules)
FIND_PACKAGE (PkgConfig REQUIRED)
VALA_PRECOMPILE (VALA_C ${PluginSources}
PACKAGES ${PluginPackages}
OPTIONS --thread ${VALA_DEBUG}
CUSTOM_VAPIS ${PluginCustomVapis}
GENERATE_VAPI
GENERATE_HEADER
)
PKG_CHECK_MODULES (PKGS REQUIRED ${PluginPkgModules})
INCLUDE_DIRECTORIES (${PKGS_INCLUDE_DIRS} ${CMAKE_BINARY_DIR}/po)
ADD_LIBRARY (${PluginName} SHARED ${VALA_C} ${PluginExtraSources})
ADD_DEFINITIONS (-DGETTEXT_PACKAGE="${PROJECT_LOWERCASE_NAME}-${MAJOR}")
TARGET_LINK_LIBRARIES (${PluginName} ${PKGS_LIBRARIES} ${PluginLinkLibs})