-
-
Notifications
You must be signed in to change notification settings - Fork 919
Expand file tree
/
Copy path.envrc
More file actions
36 lines (32 loc) · 931 Bytes
/
Copy path.envrc
File metadata and controls
36 lines (32 loc) · 931 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
if has nix; then
use flake
fi
shopt -s globstar
watch_file plugin/**/*.cpp
watch_file plugin/**/*.hpp
watch_file plugin/**/*.qml
watch_file plugin/**/*.vert
watch_file plugin/**/*.frag
watch_file **/CMakeLists.txt
watch_file plugin/src/Caelestia/I18n/trs/raw.pot
watch_file plugin/src/Caelestia/I18n/trs/*.po
if ! cmake --build build --target help &> /dev/null; then
args=()
if has clazy; then
args+=(-DCMAKE_CXX_COMPILER=clazy)
else
args+=(-DCMAKE_CXX_COMPILER=clang++)
fi
if has ccache; then
args+=(-DCMAKE_CXX_COMPILER_LAUNCHER=ccache)
fi
cmake -B build -G Ninja \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-DDISTRIBUTOR=direnv \
-DCAELESTIA_TEST_TRS=ON \
"${args[@]}"
fi
cmake --build build
export CAELESTIA_LIB_DIR="$PWD/build/lib"
export QML2_IMPORT_PATH="$PWD/build/qml:${QML2_IMPORT_PATH:-}"