cmake.backbone/ValaPluginCommonRules.cmake

18 lines
666 B
CMake

INCLUDE (FindVala)
INCLUDE (UseVala)
INCLUDE (CFlags)
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})
ADD_LIBRARY (${PluginName} SHARED ${VALA_C} ${PluginExtraSources})
ADD_DEFINITIONS (-DGETTEXT_PACKAGE="${PROJECT_LOWERCASE_NAME}-${MAJOR}")
TARGET_LINK_LIBRARIES (${PluginName} ${PKGS_LIBRARIES} ${PluginLinkLibs})