mirror of https://github.com/cutefishos/calamares
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
69 lines
2.1 KiB
CMake
69 lines
2.1 KiB
CMake
# Config file for the Calamares package
|
|
#
|
|
# The following IMPORTED targets are defined:
|
|
# - Calamares::calamares - the core library
|
|
# - Calamares::calamaresui - the UI (and QML) library
|
|
#
|
|
# For legacy use it defines the following variables:
|
|
# - Calamares_INCLUDE_DIRS - include directories for Calamares
|
|
# - Calamares_LIB_DIRS - library directories
|
|
# - Calamares_LIBRARIES - libraries to link against
|
|
|
|
@PACKAGE_INIT@
|
|
|
|
### Versioning and IMPORTED targets
|
|
#
|
|
#
|
|
include(${CMAKE_CURRENT_LIST_DIR}/CalamaresConfigVersion.cmake)
|
|
include(${CMAKE_CURRENT_LIST_DIR}/CalamaresTargets.cmake)
|
|
|
|
### Dependencies
|
|
#
|
|
# The libraries can depend on a variety of Qt and KDE Frameworks
|
|
# components, so accumulate them and find (just once).
|
|
#
|
|
macro(accumulate_deps outvar target namespace)
|
|
string(LENGTH ${namespace} _nslen)
|
|
get_target_property(_libs ${target} INTERFACE_LINK_LIBRARIES)
|
|
foreach(_lib ${_libs})
|
|
if (_lib MATCHES ^${namespace})
|
|
string(SUBSTRING ${_lib} ${_nslen} -1 _component)
|
|
list(APPEND ${outvar} ${_component})
|
|
endif()
|
|
endforeach()
|
|
endmacro()
|
|
|
|
# Qt5 infrastructure for translations is required
|
|
set(qt5_required Core Widgets LinguistTools)
|
|
accumulate_deps(qt5_required Calamares::calamares Qt5::)
|
|
accumulate_deps(qt5_required Calamares::calamaresui Qt5::)
|
|
find_package(Qt5 CONFIG REQUIRED ${qt5_required})
|
|
|
|
set(kf5_required "")
|
|
accumulate_deps(kf5_required Calamares::calamares KF5::)
|
|
accumulate_deps(kf5_required Calamares::calamaresui KF5::)
|
|
if(kf5_required)
|
|
find_package(ECM ${ECM_VERSION} NO_MODULE)
|
|
if( ECM_FOUND )
|
|
list(PREPEND CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
|
|
find_package(KF5 REQUIRED COMPONENTS ${kf5_required})
|
|
endif()
|
|
endif()
|
|
|
|
### Legacy support
|
|
#
|
|
#
|
|
set(Calamares_LIB_DIRS "@PACKAGE_CMAKE_INSTALL_LIBDIR@")
|
|
set(Calamares_INCLUDE_DIRS "@PACKAGE_CMAKE_INSTALL_INCLUDEDIR@")
|
|
set(Calamares_LIBRARIES Calamares::calamares)
|
|
|
|
### CMake support
|
|
#
|
|
#
|
|
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR})
|
|
|
|
include(CalamaresAddLibrary)
|
|
include(CalamaresAddModuleSubdirectory)
|
|
include(CalamaresAddPlugin)
|
|
include(CalamaresAddBrandingSubdirectory)
|