You are not logged in.

#1 2021-04-05 15:01:14

barabas
Member
Registered: 2020-07-16
Posts: 1

JUCE with CMake build system

JUCE got support for CMake with version 6. The official JUCE package is still on v5, and the AUR v6 package has no CMake support.

The attached PKGBUILD will install JUCE with CMake support. I hope this will be useful for someone, I don't use this anymore as there is a way to embed the JUCE library as a subdirectory of the project.

_name=JUCE
pkgname=juce-cmake
pkgver=6.0.7
pkgrel=4
pkgdesc="Cross-platform C++ framework with CMake support"
arch=('x86_64')
url="https://github.com/juce-framework/juce/"
license=('Apache' 'BSD' 'GPL3' 'ISC')
depends=('cmake>=3.15' 'alsa-lib' 'freetype2')
optdepends=('jack: for JUCE_JACK'
            'curl: for JUCE_USE_CURL'
            'libx11: juce_gui_basics'
            'libxcomposite: juce_gui_basics'
            'libxcursor: for JUCE_USE_XCURSOR'
            'libxext: juce_gui_basics'
            'libxinerama: for JUCE_USE_XINERAMA'
            'libxrandr: for JUCE_USE_XRANDR'
            'libxrender: for JUCE_USE_XRENDER'
            'webkit2gtk: for JUCE_WEB_BROWSER'
            'glu: juce_opengl'
            'mesa: juce_opengl')
provides=('juce')
source=("juce-$pkgver.tar.gz::${url}archive/${pkgver}.tar.gz")
sha512sums=('fe17273de00e34012b08e8355a04796b5e04020afb53c1473e6d891d5307e66470c8c113029a0f3270f6a103a781a7ddf81dcf7684e1ce31eb2cae7bddae840f')
prepare() {
  mv -v "${_name}-$pkgver" "$pkgname-$pkgver"
}

build() {
  cd "$pkgname-$pkgver"
  cmake . -B cmake-build -DCMAKE_INSTALL_PREFIX=$pkgdir/usr
  cmake --build cmake-build --target all
}

package() {
  cd "$pkgname-$pkgver"
  cmake --build cmake-build --target install
  install -vDm 644 ChangeList.txt -t "${pkgdir}/usr/share/${pkgname}"
  install -vDm 644 LICENSE.md -t "${pkgdir}/usr/share/licenses/${pkgname}"
}

Offline

Board footer

Powered by FluxBB