cmake.backbone/ValaBinCommonRules.cmake

24 lines
857 B
CMake
Raw Normal View History

2014-10-15 17:32:46 +04:00
INCLUDE (FindVala)
INCLUDE (UseVala)
2015-10-19 12:11:35 +03:00
INCLUDE (CFlagsCommonRules)
2014-10-15 17:32:46 +04:00
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 --thread ${VALA_DEBUG}
CUSTOM_VAPIS ${BinCustomVapis}
GENERATE_VAPI
GENERATE_HEADER
)
PKG_CHECK_MODULES (PKGS REQUIRED ${BinPkgModules})
2015-10-19 18:27:24 +03:00
INCLUDE_DIRECTORIES (${PKGS_INCLUDE_DIRS} ${CMAKE_BINARY_DIR}/po)
2014-10-15 17:32:46 +04:00
ADD_EXECUTABLE (${BinName} ${VALA_C} ${BinExtraSources})
2014-10-26 16:18:42 +03:00
ADD_DEFINITIONS (-DGETTEXT_PACKAGE="${PROJECT_LOWERCASE_NAME}-${MAJOR}")
2014-10-15 17:32:46 +04:00
TARGET_LINK_LIBRARIES (${BinName} ${PKGS_LIBRARIES} ${BinLinkLibs})
IF (BinInstall)
INSTALL (TARGETS ${BinName} DESTINATION bin)
ENDIF (BinInstall)