diff --git a/CMakeLists.txt b/CMakeLists.txt index 7aabe437e..09e5c6d1d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -543,10 +543,6 @@ set( CMAKE_INSTALL_CMAKEDIR "${CMAKE_INSTALL_LIBDIR}/cmake/Calamares" CACHE PATH set( CMAKE_INSTALL_FULL_CMAKEDIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_CMAKEDIR}" ) export( PACKAGE Calamares ) -configure_file( - CalamaresBuildTreeSettings.cmake.in - "${PROJECT_BINARY_DIR}/CalamaresBuildTreeSettings.cmake" @ONLY -) configure_package_config_file( "CalamaresConfig.cmake.in" "${PROJECT_BINARY_DIR}/CalamaresConfig.cmake" diff --git a/CalamaresBuildTreeSettings.cmake.in b/CalamaresBuildTreeSettings.cmake.in deleted file mode 100644 index 507fc3d64..000000000 --- a/CalamaresBuildTreeSettings.cmake.in +++ /dev/null @@ -1,4 +0,0 @@ -set(CALAMARES_INCLUDE_DIRS - "@PROJECT_SOURCE_DIR@/src/libcalamares" - "@PROJECT_BINARY_DIR@/src/libcalamares" -) diff --git a/CalamaresConfig.cmake.in b/CalamaresConfig.cmake.in index 7fa67b310..4c62fb477 100644 --- a/CalamaresConfig.cmake.in +++ b/CalamaresConfig.cmake.in @@ -62,7 +62,17 @@ set(Calamares_LIBRARIES Calamares::calamares) # list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) +include(CalamaresAddBrandingSubdirectory) include(CalamaresAddLibrary) include(CalamaresAddModuleSubdirectory) include(CalamaresAddPlugin) -include(CalamaresAddBrandingSubdirectory) + +# These are feature-settings that affect consumers of Calamares +# libraries as well; without Python-support in the libs, for instance, +# there's no point in having a Python plugin. +# +# This list should match the one in libcalamares/CalamaresConfig.h, +# which is the C++-language side of the same configuration. +set(Calamares_WITH_PYTHON @WITH_PYTHON@) +set(Calamares_WITH_PYTHONQT @WITH_PYTHONQT@) +set(Calamares_WITH_QML @WITH_QML@) diff --git a/src/libcalamares/CalamaresConfig.h.in b/src/libcalamares/CalamaresConfig.h.in index 98efa8c26..c081b158f 100644 --- a/src/libcalamares/CalamaresConfig.h.in +++ b/src/libcalamares/CalamaresConfig.h.in @@ -1,5 +1,5 @@ /* === This file is part of Calamares - === - * + * * SPDX-FileCopyrightText: 2020 Adriaan de Groot * * Calamares is free software: you can redistribute it and/or modify @@ -29,7 +29,14 @@ #define CMAKE_INSTALL_FULL_DATADIR "${CMAKE_INSTALL_FULL_DATADIR}/calamares" #define CMAKE_INSTALL_FULL_SYSCONFDIR "${CMAKE_INSTALL_FULL_SYSCONFDIR}" -//cmakedefines for CMake variables (e.g. for optdepends) go here +/* + * These are feature-settings that affect consumers of Calamares + * libraries as well; without Python-support in the libs, for instance, + * there's no point in having a Python plugin. + * + * This list should match the one in CalamaresConfig.cmake + * which is the CMake-time side of the same configuration. + */ #cmakedefine WITH_PYTHON #cmakedefine WITH_PYTHONQT #cmakedefine WITH_QML