89 Commits (fa75c2e2a09d73167575b38a061faff3dc82d6fa)

Author SHA1 Message Date
Adriaan de Groot 0aaf24c4a5 CMake: tell tests where their source-dir is
- Abuse BUILD_AS_TEST to pass in the value as a string
5 years ago
Adriaan de Groot fba1bf7072 CMake: add DEFINITIONS option to calamares_add_test
- There's a handful of tests that need this, it's possible
  there will be more, so just add it to the infrastructure.
5 years ago
Adriaan de Groot 6f996d8eed CMake: give yamlcpp a proper imported target
- This makes linking easier,
 - Adds the right includes (needed on FreeBSD),
 - Lets us drop silly GUI setting for non-GUI tests (I think this was
   a side-effect of compiling on FreeBSD, where UI would pull in
   /usr/local/include).
5 years ago
Adriaan de Groot 4495a4c739 CMake: Allow extra libraries in calamares_add_test
- Extra libraries specified via LIBRARIES part of CMake function
 - Convert all the other module tests
5 years ago
Adriaan de Groot 6bdc4a55de CMake: new convenience module CalamaresAddTest 5 years ago
Adriaan de Groot 96946a8447 Merge branch 'fix-unpackfs-progress'
This is an ugly hack, using Bill Auger's support for Job weights.
The unpackfs job is arbitrarily awarded a weight of 12. That makes it
(in a Netrunner install) use progress from 12% to 40% or so, overall,
as all the files are unpacked.

Also fixes bug reported by Kevin Kofler that unpackfs was only reporting
progress when it hit an exact multiple of 100 (instead of over 100).

SEE #1176
5 years ago
Adriaan de Groot b0b9073b40 CMake: fix boost.python detection on FreeBSD 5 years ago
Adriaan de Groot 5ad73681c2 CMake: actually write the NO_CONFIG setting 5 years ago
Adriaan de Groot fbb452f9bf CMake: add support for NO_CONFIG
- A C++ module should set NO_CONFIG to flag that it doesn't have a
   config file (this is an error if it secretly **does** have one)
5 years ago
Adriaan de Groot 8fc94900d3 CMake: add the tz_ translation files to the i18n build 5 years ago
Adriaan de Groot 4652df0643 CMake: allow required modules in calamares_add_plugin
- Add a REQUIRES keyword
 - Write out values to the descriptor
 - Add some documentation for the function as a whole
5 years ago
Adriaan de Groot 63d1378721 CMake: need to create dir before copying to it 5 years ago
Adriaan de Groot a08e764467 CMake: add compiled branding translations to build dir
- Copy the .qm files (compiled translations) into the build
   dir as part of the build process. This is independent of
   **installing** those same translations, but does allow
   the translations to be used by Calamares when run from the
   build dir for testing.
5 years ago
Adriaan de Groot ba7ee445c6 CMake: switch to using autouic on plugins
- Use autouic so that we can also pass in --include to add
   a code-warning-suppression to the generated code, just like
   we can do with moc.
6 years ago
Kevin Kofler fa9aeb4a5d CMake: Fix BoostPython3.cmake for Fedora >= 30
CMakeModules/BoostPython3.cmake: Also try e.g. "python37" as the module
name, because Fedora 30 switched from the e.g. "python-py37" format to
that. Otherwise, Boost::Python3 cannot be found on Fedora without
manually setting CALAMARES_BOOST_PYTHON3_COMPONENT.
6 years ago
Adriaan de Groot c9447d7794 CMake: add test for python modules
- Only Python modules have a loadmodule-test added. This will call
   run(), but with an empty configuration it should be a no-op.
6 years ago
Adriaan de Groot 1e391bda7e CMake: document intention to run more tests on modules
- Loading the module will check Python modules for syntax,
   and C++ modules for symbols. This would be a good idea,
   except for where it calls exec() and does things to the
   running system. Most modules are harmless with an empty
   config, but you never know (e.g. a process module).
6 years ago
Adriaan de Groot 6f9548af34 CMake: Check module interfaces
- Only allow meaningful interface strings
 - Improve documentation of which interfaces work for
   which module types.
6 years ago
Adriaan de Groot bdb7bf71a8 Reduce warnings from moc-generated code
- The auto-generated code produces a lot of warnings from
   Clang 8; this obscures the more meaningful warnings from
   actual Calamares code, so tone the warnings down.
 - For Clang, set CALAMARES_MOC_OPTIONS.
 - Add convenience CMake function for automoccing. It applies
   the options as needed to a given target.
6 years ago
Adriaan de Groot d7594860b0 CMake: fix calamares_add_library
- Remove the commented-out cruft and the whinging
 - Fix use of COMPILE_DEFINITIONS with a list passed in
 - Remove unused arguments (TYPE, TARGET)
 - Document calamares_add_library
 - Document how to use COMPILE_DEFINITIONS (in calamares_add_plugin)
6 years ago
Adriaan de Groot 82c51dec37 CMake: don't change cmake logging on release builds
- There is no real need to reduce the logging on release builds,
   it's just confusing that all the cmake-time output changes
   in a non-meaningful way.
6 years ago
Adriaan de Groot 4602b30264 [libcalamaresui] Use PYTHONQT_INCLUDE_DIRS
- document new variable from the CMake module
 - use it in libcalamaresui to simplify #include'ing the
   header for the "all" extension.

Suggested by Denis Proskurin.
6 years ago
Adriaan de Groot 54bee71b44 CMake: Search for PythonQt_QtAll.h
Suggested by Denis Proskurin.
6 years ago
Adriaan de Groot 9651c588bc CMake: Search for PythonQt headers in more places.
Suggested by Denis Proskurin.
6 years ago
Adriaan de Groot 2f6e80dc42 CMake: always copy the config files to the build directory.
Switching to INSTALL_CONFIG=OFF breaks tests by not having them
in the build directory. Some logic was coupling not-installing
to not-using-in-build-dir too closely.
6 years ago
Adriaan de Groot d325366e92 CMake: fix plugin NO_INSTALL keyword
Although the NO_INSTALL keyword could be specified for
Calamares plugins, it didn't actually do anything. Now
it does. A NO_INSTALL module does not install configs
or libraries.
6 years ago
Adriaan de Groot def459a29d [libcalamaresui] Read emergency setting from module.desc
- Read setting from the module descriptor
 - Document optional settings
 - Add EMERGENCY keyword to the CMake helper functions
6 years ago
Adriaan de Groot 0ffb6ed67c CMake: fix checks for supported rcc format versions 6 years ago
Adriaan de Groot 7eae99223e CMake: check if rcc supports --format-version
- The new format was introduced in Qt 5.7, and Qt 5.9 introduced
   the --format-version flag to rcc to switch back to the reproducible
   format 1. For distro's with Qt 5.7, don't use the new flag.
 - Reported from Neptune Linux, #979
6 years ago
Adriaan de Groot 733836839a CMake: remove module that duplicates what is in CMake proper 7 years ago
Adriaan de Groot ace30e149a CMake: fix defaults-handling which was breaking in-tree build 7 years ago
Adriaan de Groot abe05ac8ab CMake: document add_branding_subdirectory()
- add feature to allow (re)naming and to support greater
   directory depths.
7 years ago
Adriaan de Groot b95fe2227f CMake: remove debugging from macro 7 years ago
Adriaan de Groot d4f0be02d3 i18n: make build reproducible
The RCC output files in version 2 contain a timestamp of the
source file, which changes per build. Drop down to version 1,
which just removes the timestamp.

See reproducible builds note 'timestamps in source generated by rcc'.

FIXES #917
7 years ago
Adriaan de Groot 42ba505ceb CMake: add license headers, copyright
Since we install the CMake files now, also put license headers in them.
These files are intended to help plugin and branding component authors
write them in a simple Calamares-idiomatic way.
7 years ago
Adriaan de Groot 986c5f5a9a CMake: improve branding component macros
- document preferred component layout
 - simplify parameters to the branding macros
 - allow structured branding components with SUBDIRECTORIES
7 years ago
Adriaan de Groot 345118aec9 CMake: improve branding support
- Fix broken subdirectory call
 - Automatically process lang/ if there isn't a CMakeLists.txt,
   this was a bogus restriction
 - Add support macros for installing branding and translations
7 years ago
Adriaan de Groot 3723355fb9 CMake: ignore config files (and tests) for skipped modules. 7 years ago
Adriaan de Groot 27e1de6548 [users] Use libpwquality for additional password checks
- add cmake module to find libpwquality
 - move checking functions to their own file
 - some Transifex hackery
 - stub out the libpwquality check
7 years ago
Adriaan de Groot 4630008fa1 CMake: don't copy over modules with unsupported interfaces.
If Python isn't found, or PythonQt isn't found, there is no point
in copying over the modules into the build tree; this may even be
misleading because the files are there, but won't work and this
will be noticed at runtime only.

Instead, skip the modules and explain why.
7 years ago
Adriaan de Groot 6e01bb0fa4 CMake: factor out explanation of skipped modules.
Make a function out of explaining-skipped-modules, and call it
not only after collecting all the modules, but also after
the feature summary, so that it's quite clear which modules
are skipped.
7 years ago
Adriaan de Groot 1a42b8af41 Merge branch 'kpmcore-3.2'
- Bumps requireed KPMCore to 3.3 (in spite of the branch name)
 - Cleans up some dependencies

Thanks to Andrius Stikonas.
7 years ago
Adriaan de Groot 03dd487fc2 Merge branch '3.1.x-stable' 7 years ago
Adriaan de Groot 2e1f389997 CMake: explain which modules are skipped
Modules may be skipped for different reasons: SKIP_MODULES
is the traditional approach to suppress some, but other modules
may have unmet build requirements (e.g. Plasma Look-and-Feel,
or the Partitioning module) and should be able to opt-out
of being built. For all those skipped, log it explicitly after
all the modules have been examined.

Only CMake-based (e.g. C++) modules support opting-out in this way.
7 years ago
Adriaan de Groot cc15dd9ec7 Merge branch 'master' into kpmcore-3.2
- Pull in Master, merge README, to simplify merging this
   branch into master (soon-ish, once kpmcore 3.3 becomes available
   in builders)
7 years ago
Adriaan de Groot 84c28e9efa CMake: explain better why PythonQt isn't found 7 years ago
Andrius Štikonas 1620f6a668 Merge branch 'master' into lvm2 7 years ago
Adriaan de Groot fda4b4e3c2 CMake: improve searching for PythonQt
- don't log when libs not found
 - log that it's the Python libraries version (not Python itself)
 - fix RE that was getting the wrong results for maj.min
7 years ago
Adriaan de Groot 970b6fcb19 CMake: find PythonQt better
- replace weird distinction between 3.0 and 3.2 by searching once
 - prefer 3.2
 - also look for suffixed versions (PythonXY) besides the Python3 suffix

FIXES #857
7 years ago
Adriaan de Groot ebb0331672 CMake: remove unused module 7 years ago