My CMake modules, scripts, templates
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
914 B

INCLUDE (FindVala)
INCLUDE (UseVala)
INCLUDE (CFlagsCommonRules)
FIND_PACKAGE (PkgConfig REQUIRED)
SET (CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/run") # Avoid of "dll not found" messages
VALA_PRECOMPILE (VALA_C ${BinSources}
PACKAGES ${BinPackages}
OPTIONS ${BinValaOpts} ${VALA_DEBUG}
CUSTOM_VAPIS ${BinCustomVapis}
GENERATE_VAPI
GENERATE_HEADER
)
IF (NOT "${BinPkgModules}" STREQUAL "")
PKG_CHECK_MODULES (PKGS REQUIRED ${BinPkgModules})
ENDIF ()
INCLUDE_DIRECTORIES (${PKGS_INCLUDE_DIRS} ${CMAKE_BINARY_DIR}/po)
ADD_EXECUTABLE (${BinName} ${VALA_C} ${BinExtraSources})
ADD_DEFINITIONS (-DGETTEXT_PACKAGE="${PROJECT_LOWERCASE_NAME}-${MAJOR}")
TARGET_LINK_LIBRARIES (${BinName} ${PKGS_LIBRARIES} ${BinLinkLibs})
IF (BinInstall)
INSTALL (TARGETS ${BinName} DESTINATION bin)
ENDIF (BinInstall)