mirror of
https://github.com/k4yt3x/video2x.git
synced 2025-01-28 21:38:41 +00:00
build(just): make CMake generator a variable
Signed-off-by: k4yt3x <i@k4yt3x.com>
This commit is contained in:
parent
0bbee7c66b
commit
43ecf9e825
30
.justfile
30
.justfile
@ -1,9 +1,10 @@
|
|||||||
# Use PowerShell to run recipes on Windows
|
# Use PowerShell to run recipes on Windows
|
||||||
set windows-shell := ['pwsh', '-Command']
|
set windows-shell := ['pwsh', '-Command']
|
||||||
|
|
||||||
# Default build directory and C++ compiler
|
# Default build directory, generator, and C++ compiler
|
||||||
bindir := "build"
|
bindir := "build"
|
||||||
cxx_compiler := "clang++"
|
generator := "Ninja"
|
||||||
|
cxx := "clang++"
|
||||||
|
|
||||||
# Test video and output paths
|
# Test video and output paths
|
||||||
test_video := "data/standard-test.mp4"
|
test_video := "data/standard-test.mp4"
|
||||||
@ -12,14 +13,13 @@ test_output := "data/output.mp4"
|
|||||||
[unix]
|
[unix]
|
||||||
[group('build')]
|
[group('build')]
|
||||||
build:
|
build:
|
||||||
cmake -G Ninja -S . -B {{bindir}} \
|
cmake -G '{{generator}}' -S . -B {{bindir}} \
|
||||||
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
|
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
|
||||||
-DCMAKE_CXX_COMPILER={{cxx_compiler}} \
|
-DCMAKE_CXX_COMPILER={{cxx}} \
|
||||||
-DCMAKE_BUILD_TYPE=Release \
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
-DCMAKE_INSTALL_PREFIX={{bindir}}/video2x-install \
|
-DCMAKE_INSTALL_PREFIX={{bindir}}/video2x-install \
|
||||||
-DVIDEO2X_ENABLE_NATIVE=ON
|
-DVIDEO2X_ENABLE_NATIVE=ON
|
||||||
cmake --build {{bindir}} --config Release --parallel --target install
|
cmake --build {{bindir}} --config Release --parallel --target install
|
||||||
cp {{bindir}}/compile_commands.json .
|
|
||||||
|
|
||||||
[windows]
|
[windows]
|
||||||
[group('build')]
|
[group('build')]
|
||||||
@ -40,9 +40,9 @@ build:
|
|||||||
[unix]
|
[unix]
|
||||||
[group('build')]
|
[group('build')]
|
||||||
static:
|
static:
|
||||||
cmake -G Ninja -S . -B {{bindir}} \
|
cmake -G '{{generator}}' -S . -B {{bindir}} \
|
||||||
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
|
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
|
||||||
-DCMAKE_CXX_COMPILER={{cxx_compiler}} \
|
-DCMAKE_CXX_COMPILER={{cxx}} \
|
||||||
-DBUILD_SHARED_LIBS=OFF \
|
-DBUILD_SHARED_LIBS=OFF \
|
||||||
-DCMAKE_BUILD_TYPE=Release \
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
-DCMAKE_INSTALL_PREFIX={{bindir}}/video2x-install \
|
-DCMAKE_INSTALL_PREFIX={{bindir}}/video2x-install \
|
||||||
@ -50,17 +50,15 @@ static:
|
|||||||
-DVIDEO2X_USE_EXTERNAL_SPDLOG=OFF \
|
-DVIDEO2X_USE_EXTERNAL_SPDLOG=OFF \
|
||||||
-DVIDEO2X_USE_EXTERNAL_BOOST=OFF
|
-DVIDEO2X_USE_EXTERNAL_BOOST=OFF
|
||||||
cmake --build {{bindir}} --config Release --parallel --target install
|
cmake --build {{bindir}} --config Release --parallel --target install
|
||||||
cp {{bindir}}/compile_commands.json .
|
|
||||||
|
|
||||||
[unix]
|
[unix]
|
||||||
[group('build')]
|
[group('build')]
|
||||||
debug:
|
debug:
|
||||||
cmake -G Ninja -S . -B {{bindir}} \
|
cmake -G '{{generator}}' -S . -B {{bindir}} \
|
||||||
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
|
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
|
||||||
-DCMAKE_CXX_COMPILER={{cxx_compiler}} \
|
-DCMAKE_CXX_COMPILER={{cxx}} \
|
||||||
-DCMAKE_BUILD_TYPE=Debug
|
-DCMAKE_BUILD_TYPE=Debug
|
||||||
cmake --build {{bindir}} --config Debug --parallel
|
cmake --build {{bindir}} --config Debug --parallel
|
||||||
cp {{bindir}}/compile_commands.json .
|
|
||||||
|
|
||||||
[windows]
|
[windows]
|
||||||
[group('build')]
|
[group('build')]
|
||||||
@ -91,9 +89,9 @@ debian:
|
|||||||
libomp-dev \
|
libomp-dev \
|
||||||
libspdlog-dev \
|
libspdlog-dev \
|
||||||
libboost-program-options-dev
|
libboost-program-options-dev
|
||||||
cmake -G Ninja -B /tmp/build -S . \
|
cmake -G '{{generator}}' -B /tmp/build -S . \
|
||||||
-DVIDEO2X_USE_EXTERNAL_NCNN=OFF \
|
-DVIDEO2X_USE_EXTERNAL_NCNN=OFF \
|
||||||
-DCMAKE_CXX_COMPILER={{cxx_compiler}} \
|
-DCMAKE_CXX_COMPILER={{cxx}} \
|
||||||
-DCMAKE_BUILD_TYPE=Release \
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
-DCMAKE_INSTALL_PREFIX=/tmp/install \
|
-DCMAKE_INSTALL_PREFIX=/tmp/install \
|
||||||
-DINSTALL_BIN_DESTINATION=. \
|
-DINSTALL_BIN_DESTINATION=. \
|
||||||
@ -118,7 +116,7 @@ ubuntu2404:
|
|||||||
glslang-tools \
|
glslang-tools \
|
||||||
libomp-dev \
|
libomp-dev \
|
||||||
libboost-program-options-dev
|
libboost-program-options-dev
|
||||||
cmake -G Ninja -B build -S . \
|
cmake -G '{{generator}}' -B build -S . \
|
||||||
-DVIDEO2X_USE_EXTERNAL_NCNN=OFF \
|
-DVIDEO2X_USE_EXTERNAL_NCNN=OFF \
|
||||||
-DVIDEO2X_USE_EXTERNAL_SPDLOG=OFF \
|
-DVIDEO2X_USE_EXTERNAL_SPDLOG=OFF \
|
||||||
-DCMAKE_CXX_COMPILER=g++ \
|
-DCMAKE_CXX_COMPILER=g++ \
|
||||||
@ -148,7 +146,7 @@ ubuntu2204:
|
|||||||
glslang-tools \
|
glslang-tools \
|
||||||
libomp-dev \
|
libomp-dev \
|
||||||
libboost-program-options-dev
|
libboost-program-options-dev
|
||||||
cmake -G Ninja -B build -S . \
|
cmake -G '{{generator}}' -B build -S . \
|
||||||
-DVIDEO2X_USE_EXTERNAL_NCNN=OFF \
|
-DVIDEO2X_USE_EXTERNAL_NCNN=OFF \
|
||||||
-DVIDEO2X_USE_EXTERNAL_SPDLOG=OFF \
|
-DVIDEO2X_USE_EXTERNAL_SPDLOG=OFF \
|
||||||
-DCMAKE_CXX_COMPILER=g++ \
|
-DCMAKE_CXX_COMPILER=g++ \
|
||||||
@ -177,7 +175,7 @@ appimage:
|
|||||||
libboost-program-options1.83-dev \
|
libboost-program-options1.83-dev \
|
||||||
libboost-program-options1.83.0 \
|
libboost-program-options1.83.0 \
|
||||||
libspdlog-dev
|
libspdlog-dev
|
||||||
cmake -G Ninja -B build -S . \
|
cmake -G '{{generator}}' -B build -S . \
|
||||||
-DVIDEO2X_USE_EXTERNAL_NCNN=OFF \
|
-DVIDEO2X_USE_EXTERNAL_NCNN=OFF \
|
||||||
-DNCNN_BUILD_SHARED_LIBS=ON \
|
-DNCNN_BUILD_SHARED_LIBS=ON \
|
||||||
-DCMAKE_CXX_COMPILER=clang++ \
|
-DCMAKE_CXX_COMPILER=clang++ \
|
||||||
|
Loading…
Reference in New Issue
Block a user