24 lines
872 B
CMake
24 lines
872 B
CMake
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} --thread ${VALA_DEBUG}
|
|
CUSTOM_VAPIS ${BinCustomVapis}
|
|
GENERATE_VAPI
|
|
GENERATE_HEADER
|
|
)
|
|
PKG_CHECK_MODULES (PKGS REQUIRED ${BinPkgModules})
|
|
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)
|