refactor(cmake): Allow targets to be enabled individually

Each major target of polybar can now be enabled/disabled while
configuring (even polybar itself).

The cmake code specific to each target will only run if the target is
enabled.

This allows us to for example just build the documentation without
having to run all the cmake code related to compilation or having the
polybar dependencies installed (other than sphinx).
This commit is contained in:
patrick96
2020-12-22 03:43:06 +01:00
committed by Patrick Ziegler
parent 771154742c
commit c24a6999a4
14 changed files with 357 additions and 327 deletions

View File

@ -21,9 +21,9 @@ jobs:
run: sudo apt-get install -y python3-sphinx
- name: Build Documentation
run: |
mkdir -p doc/build
cd doc/build
cmake ..
mkdir -p build
cd build
cmake -DDISABLE_ALL=ON -DBUILD_DOC=ON ..
make doc
build: