| 1 | #!/bin/bashscip-shell filesystem . . `/bin/bash`. |
| 2 | |
| 3 | if [[ -z "${GITHUB_TAG}" ]]; then |
| 4 | echoscip-shell system . . echo. "Building ksnip with latest version of kImageAnnotator" |
| 5 | |
| 6 | gitscip-shell system . . git. clone --depth 1 https://github.com/ksnip/kImageAnnotator.git |
| 7 | else |
| 8 | KIMAGEANNOTATOR_VERSION=$(grepscip-shell system . . grep. "set.*KIMAGEANNOTATOR_MIN_VERSION" CMakeLists.txt | egrepscip-shell system . . egrep. -o "${VERSION_REGEX}") |
| 9 | echoscip-shell system . . echo. "Building ksnip with kImageAnnotator version ${KIMAGEANNOTATOR_VERSION}" |
| 10 | |
| 11 | gitscip-shell system . . git. clone --depth 1 --branch "v${KIMAGEANNOTATOR_VERSION}" https://github.com/ksnip/kImageAnnotator.git |
| 12 | fi |
| 13 | |
| 14 | cd kImageAnnotator || exit |
| 15 | mkdirscip-shell system . . mkdir. build && cd build || exit |
| 16 | cmakescip-shell system . . cmake. .. -G"${CMAKE_GENERATOR}" -DCMAKE_BUILD_TYPE="${BUILD_TYPE}" -DBUILD_EXAMPLE=OFF -DCMAKE_INSTALL_PREFIX="${INSTALL_PREFIX}" -DCMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES="${INSTALL_PREFIX}/include" -DBUILD_WITH_QT6="${USE_QT6}" |
| 17 | ${MAKE_BINARY} && ${MAKE_BINARY} install |