mirror of https://github.com/cutefishos/calamares
CMake: install missing module
- The CMake modules for Calamares expect to find CMakeColors
- Also the translation support macro
- Restore CalamaresUse.cmake
- File was removed after 3.1 in db105079
, but it is actually useful
for out-of-tree modules. Restore it and massage into better shape.
- Simplify by adding path to the search path (otherwise the individual
macro files would also have to switch to including with a full path).
main
parent
83639b182b
commit
af67ab2722
@ -0,0 +1,29 @@
|
||||
# A setup-cmake-things-for-Calamares module.
|
||||
#
|
||||
# This module handles looking for dependencies and including
|
||||
# all of the Calamares macro modules, so that you can focus
|
||||
# on just using the macros to build Calamares modules.
|
||||
# Typical use looks like this:
|
||||
#
|
||||
# ```
|
||||
# find_package( Calamares REQUIRED )
|
||||
# include( "${CALAMARES_CMAKE_DIR}/CalamaresUse.cmake" )
|
||||
# ```
|
||||
#
|
||||
# The first CMake command finds Calamares (which will contain
|
||||
# this file), then adds the found location to the search path,
|
||||
# and then includes this file. After that, you can use
|
||||
# Calamares module and plugin macros.
|
||||
|
||||
if( NOT CALAMARES_CMAKE_DIR )
|
||||
message( FATAL_ERROR "Use find_package(Calamares) first." )
|
||||
endif()
|
||||
set( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CALAMARES_CMAKE_DIR} )
|
||||
|
||||
find_package( Qt5 @QT_VERSION@ CONFIG REQUIRED Core Widgets )
|
||||
|
||||
include( CalamaresAddLibrary )
|
||||
include( CalamaresAddModuleSubdirectory )
|
||||
include( CalamaresAddPlugin )
|
||||
include( CalamaresAddBrandingSubdirectory )
|
||||
|
Loading…
Reference in New Issue