CalamaresUse.cmake.in 980 B

123456789101112131415161718192021222324252627282930
  1. # A setup-cmake-things-for-Calamares module.
  2. #
  3. # This module handles looking for dependencies and including
  4. # all of the Calamares macro modules, so that you can focus
  5. # on just using the macros to build Calamares modules.
  6. # Typical use looks like this:
  7. #
  8. # ```
  9. # find_package( Calamares REQUIRED )
  10. # include( "${CALAMARES_CMAKE_DIR}/CalamaresUse.cmake" )
  11. # ```
  12. #
  13. # The first CMake command finds Calamares (which will contain
  14. # this file), then adds the found location to the search path,
  15. # and then includes this file. After that, you can use
  16. # Calamares module and plugin macros.
  17. if( NOT CALAMARES_CMAKE_DIR )
  18. message( FATAL_ERROR "Use find_package(Calamares) first." )
  19. endif()
  20. set( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CALAMARES_CMAKE_DIR} )
  21. find_package( Qt5 @QT_VERSION@ CONFIG REQUIRED Core Widgets LinguistTools )
  22. include( CalamaresAddLibrary )
  23. include( CalamaresAddModuleSubdirectory )
  24. include( CalamaresAddPlugin )
  25. include( CalamaresAddBrandingSubdirectory )