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.

ValaBinCommonRules.cmake 914B

12345678910111213141516171819202122232425
  1. INCLUDE (FindVala)
  2. INCLUDE (UseVala)
  3. INCLUDE (CFlagsCommonRules)
  4. FIND_PACKAGE (PkgConfig REQUIRED)
  5. SET (CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/run") # Avoid of "dll not found" messages
  6. VALA_PRECOMPILE (VALA_C ${BinSources}
  7. PACKAGES ${BinPackages}
  8. OPTIONS ${BinValaOpts} ${VALA_DEBUG}
  9. CUSTOM_VAPIS ${BinCustomVapis}
  10. GENERATE_VAPI
  11. GENERATE_HEADER
  12. )
  13. IF (NOT "${BinPkgModules}" STREQUAL "")
  14. PKG_CHECK_MODULES (PKGS REQUIRED ${BinPkgModules})
  15. ENDIF ()
  16. INCLUDE_DIRECTORIES (${PKGS_INCLUDE_DIRS} ${CMAKE_BINARY_DIR}/po)
  17. ADD_EXECUTABLE (${BinName} ${VALA_C} ${BinExtraSources})
  18. ADD_DEFINITIONS (-DGETTEXT_PACKAGE="${PROJECT_LOWERCASE_NAME}-${MAJOR}")
  19. TARGET_LINK_LIBRARIES (${BinName} ${PKGS_LIBRARIES} ${BinLinkLibs})
  20. IF (BinInstall)
  21. INSTALL (TARGETS ${BinName} DESTINATION bin)
  22. ENDIF (BinInstall)