Merge branch 'master' into groove
27
.appveyor.yml
Normal file
@@ -0,0 +1,27 @@
|
||||
clone_depth: 1
|
||||
version: "{build}"
|
||||
image: Visual Studio 2017
|
||||
platform:
|
||||
- x86
|
||||
- x64
|
||||
environment:
|
||||
matrix:
|
||||
- compiler: msvc
|
||||
install:
|
||||
- vcpkg install --triplet %PLATFORM%-windows --recurse fftw3 libsamplerate libsndfile sdl2
|
||||
- nuget install clcache -Version 4.1.0
|
||||
build_script:
|
||||
- cd %APPVEYOR_BUILD_FOLDER%
|
||||
- mkdir build
|
||||
- cd build
|
||||
- ps: $env:CMAKE_PLATFORM="$(if ($env:PLATFORM -eq 'x64') { 'x64' } else { '' })"
|
||||
- ps: $env:QT_SUFFIX="$(if ($env:PLATFORM -eq 'x64') { '_64' } else { '' })"
|
||||
- cmake -DUSE_COMPILE_CACHE=ON -DCACHE_TOOL=%APPVEYOR_BUILD_FOLDER%/clcache.4.1.0/clcache-4.1.0/clcache.exe -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_PREFIX_PATH=c:/Qt/5.12/msvc2017%QT_SUFFIX%;c:/tools/vcpkg/installed/%PLATFORM%-windows -DCMAKE_GENERATOR_PLATFORM="%CMAKE_PLATFORM%" ..
|
||||
- cmake --build . -- /maxcpucount:4
|
||||
- cmake --build . --target tests
|
||||
- cmake --build . --target package
|
||||
artifacts:
|
||||
- path: 'build\lmms-*.exe'
|
||||
name: Installer
|
||||
cache:
|
||||
- c:/tools/vcpkg/installed
|
||||
@@ -12,6 +12,18 @@ shared:
|
||||
key: ccache-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ .Branch }}-{{ .BuildNum }}
|
||||
paths:
|
||||
- ~/.ccache
|
||||
restore_homebrew_cache: &restore_homebrew_cache
|
||||
restore_cache:
|
||||
keys:
|
||||
- homebrew-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ .Branch }}
|
||||
- homebrew-{{ arch }}-{{ .Environment.CIRCLE_JOB }}
|
||||
- homebrew-{{ arch }}
|
||||
save_homebrew_cache: &save_homebrew_cache
|
||||
save_cache:
|
||||
key: homebrew-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ .Branch }}-{{ .BuildNum }}
|
||||
paths:
|
||||
- ~/Library/Caches/Homebrew
|
||||
- /usr/local/Homebrew
|
||||
|
||||
ccache_stats: &ccache_stats
|
||||
run:
|
||||
@@ -28,6 +40,16 @@ shared:
|
||||
name: Initialize
|
||||
command: |
|
||||
mkdir -p /tmp/artifacts
|
||||
# Workaround for failing submodule fetching
|
||||
git config --global --unset url."ssh://git@github.com".insteadOf || true
|
||||
if [[ -n "${CIRCLE_PR_NUMBER}" ]]
|
||||
then
|
||||
echo "Fetching out merged pull request"
|
||||
git fetch -u origin refs/pull/${CIRCLE_PR_NUMBER}/merge:pr/merge
|
||||
git checkout pr/merge
|
||||
else
|
||||
echo "Not a pull request"
|
||||
fi
|
||||
|
||||
# Commmon environment variables
|
||||
common_environment: &common_environment
|
||||
@@ -54,6 +76,18 @@ jobs:
|
||||
../cmake/build_win32.sh
|
||||
make lmms
|
||||
make
|
||||
- run:
|
||||
name: Build tests
|
||||
command: cd build && make tests
|
||||
- run:
|
||||
name: Build installer
|
||||
command: |
|
||||
cd build
|
||||
make package
|
||||
cp ./lmms-*.exe /tmp/artifacts/
|
||||
- store_artifacts:
|
||||
path: /tmp/artifacts/
|
||||
destination: /
|
||||
- *ccache_stats
|
||||
- *save_cache
|
||||
mingw64:
|
||||
@@ -71,11 +105,23 @@ jobs:
|
||||
mkdir build && cd build
|
||||
../cmake/build_win64.sh
|
||||
make
|
||||
- run:
|
||||
name: Build tests
|
||||
command: cd build && make tests
|
||||
- run:
|
||||
name: Build installer
|
||||
command: |
|
||||
cd build
|
||||
make package
|
||||
cp ./lmms-*.exe /tmp/artifacts/
|
||||
- store_artifacts:
|
||||
path: /tmp/artifacts/
|
||||
destination: /
|
||||
- *ccache_stats
|
||||
- *save_cache
|
||||
linux.gcc:
|
||||
docker:
|
||||
- image: lmmsci/linux.gcc:18.04
|
||||
- image: lmmsci/linux.gcc:16.04
|
||||
environment:
|
||||
<<: *common_environment
|
||||
steps:
|
||||
@@ -84,7 +130,10 @@ jobs:
|
||||
- *restore_cache
|
||||
- run:
|
||||
name: Configure
|
||||
command: mkdir build && cd build && cmake .. $CMAKE_OPTS -DCMAKE_INSTALL_PREFIX=./install
|
||||
command: |
|
||||
source /opt/qt5*/bin/qt5*-env.sh || true
|
||||
mkdir build && cd build
|
||||
cmake .. $CMAKE_OPTS -DCMAKE_INSTALL_PREFIX=./install
|
||||
- run:
|
||||
name: Build
|
||||
command: cd build && make
|
||||
@@ -100,7 +149,7 @@ jobs:
|
||||
command: |
|
||||
cd build
|
||||
make install
|
||||
make appimage
|
||||
make appimage || (cat appimage.log && false)
|
||||
cp ./lmms-*.AppImage /tmp/artifacts/
|
||||
- store_artifacts:
|
||||
path: /tmp/artifacts/
|
||||
@@ -117,10 +166,53 @@ jobs:
|
||||
- run:
|
||||
name: Shellcheck
|
||||
command: shellcheck $(find "./cmake/" -type f -name '*.sh' -o -name "*.sh.in")
|
||||
macos:
|
||||
environment:
|
||||
<<: *common_environment
|
||||
macos:
|
||||
xcode: "9.3.1"
|
||||
steps:
|
||||
- checkout
|
||||
- *init
|
||||
- *restore_homebrew_cache
|
||||
- *restore_cache
|
||||
- run:
|
||||
name: Install Homebrew dependencies
|
||||
command: brew update && brew install ccache fftw cmake pkg-config libogg libvorbis lame libsndfile libsamplerate jack sdl libgig libsoundio stk fluid-synth portaudio fltk qt5 carla
|
||||
- run:
|
||||
name: Install nodejs dependencies
|
||||
command: npm install -g appdmg
|
||||
- run:
|
||||
name: Building
|
||||
command: |
|
||||
mkdir build && cd build
|
||||
cmake .. -DCMAKE_INSTALL_PREFIX="../target" -DCMAKE_PREFIX_PATH="$(brew --prefix qt5)" $CMAKE_OPTS -DUSE_WERROR=OFF
|
||||
make
|
||||
- run:
|
||||
name: Build tests
|
||||
command: cd build && make tests
|
||||
- run:
|
||||
name: Run tests
|
||||
command: build/tests/tests
|
||||
- run:
|
||||
name: Build DMG
|
||||
command: |
|
||||
cd build
|
||||
make install
|
||||
make dmg
|
||||
cp ./lmms-*.dmg /tmp/artifacts/
|
||||
- store_artifacts:
|
||||
path: /tmp/artifacts/
|
||||
destination: /
|
||||
- *save_cache
|
||||
- *save_homebrew_cache
|
||||
|
||||
|
||||
workflows:
|
||||
version: 2
|
||||
build-and-test:
|
||||
jobs:
|
||||
- macos
|
||||
- mingw32
|
||||
- mingw64
|
||||
- linux.gcc
|
||||
|
||||
5
.editorconfig
Normal file
@@ -0,0 +1,5 @@
|
||||
root = true
|
||||
|
||||
[*]
|
||||
indent_style = tab
|
||||
tab_width = 4
|
||||
1
.github/FUNDING.yml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
custom: https://lmms.io/get-involved/#donate
|
||||
30
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve
|
||||
title: ''
|
||||
labels: bug
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
# Please search the issue tracker for existing bug reports before submitting your own. Delete this line to confirm no similar report has been posted yet.
|
||||
|
||||
### Bug Summary
|
||||
|
||||
#### Steps to reproduce
|
||||
|
||||
#### Expected behavior
|
||||
|
||||
#### Actual behavior
|
||||
|
||||
#### Screenshot
|
||||
|
||||
#### LMMS version used
|
||||
|
||||
#### Logs
|
||||
<details>
|
||||
<summary>Click to expand</summary>
|
||||
<pre>
|
||||
<!-- paste logs here -->
|
||||
</pre>
|
||||
</details>
|
||||
4
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
contact_links:
|
||||
- name: Get help on Discord
|
||||
url: https://lmms.io/chat/
|
||||
about: Need help? Have a question? Reach out to other LMMS users on our Discord server!
|
||||
18
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for this project
|
||||
title: ''
|
||||
labels: enhancement
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
# Please search the issue tracker for existing feature requests before submitting your own. Delete this line to confirm no similar request has been posted yet.
|
||||
|
||||
### Enhancement Summary
|
||||
|
||||
#### Justification
|
||||
|
||||
#### Mockup
|
||||
|
||||
<!-- If your request encompasses changes to the user interface, provide a mockup of your proposal here -->
|
||||
1
.gitignore
vendored
@@ -1,6 +1,7 @@
|
||||
/build
|
||||
/target
|
||||
.*.sw?
|
||||
.DS_Store
|
||||
*~
|
||||
/CMakeLists.txt.user
|
||||
/plugins/zynaddsubfx/zynaddsubfx/ExternalPrograms/Controller/Makefile
|
||||
|
||||
6
.gitmodules
vendored
@@ -28,3 +28,9 @@
|
||||
[submodule "src/3rdparty/weakjack/weakjack"]
|
||||
path = src/3rdparty/weakjack/weakjack
|
||||
url = https://github.com/x42/weakjack.git
|
||||
[submodule "src/3rdparty/mingw-std-threads"]
|
||||
path = src/3rdparty/mingw-std-threads
|
||||
url = https://github.com/meganz/mingw-std-threads.git
|
||||
[submodule "doc/wiki"]
|
||||
path = doc/wiki
|
||||
url = https://github.com/lmms/lmms.wiki.git
|
||||
|
||||
7
.mailmap
@@ -1,5 +1,5 @@
|
||||
Alexandre Almeida <wilsalx@gmail.com> <meta.lx@hotmail.com>
|
||||
Tobias Doerffel <tobias.doerffel@gmail.com>
|
||||
Tobias Junghans <tobias.doerffel@gmail.com>
|
||||
Dave French <dave.french3@googlemail.com>
|
||||
Paul Giblock <drfaygo@gmail.com> <pgib@users.sf.net>
|
||||
Paul Giblock <drfaygo@gmail.com> <p@pgiblock.net>
|
||||
@@ -26,3 +26,8 @@ Thomas Clark <the.thomas.j.clark@gmail.com>
|
||||
Thomas Clark <the.thomas.j.clark@gmail.com> <tjclark@wpi.edu>
|
||||
anonymous <support@lmms.io> Locale updater <>
|
||||
grejppi <grejppi@gmail.com>
|
||||
Johannes Lorenz <j.git@lorenz-ho.me> <johannes89@mailueberfall.de>
|
||||
Johannes Lorenz <j.git@lorenz-ho.me> <1042576+JohannesLorenz@users.noreply.github.com>
|
||||
Noah Brecht <noahb2713@gmail.com>
|
||||
Olivier Humbert <trebmuh@tuxfamily.org> <trebmuh@users.noreply.github.com>
|
||||
Hussam al-Homsi <sawuare@gmail.com> Hussam Eddin Alhomsi <hussameddin.alhomsi@gmail.com>
|
||||
|
||||
30
.travis.yml
@@ -4,28 +4,44 @@ dist: trusty
|
||||
sudo: required
|
||||
cache:
|
||||
directories:
|
||||
- apt_mingw_cache
|
||||
- $HOME/apt_mingw_cache
|
||||
- $HOME/.ccache
|
||||
- $HOME/pbuilder-bases
|
||||
matrix:
|
||||
include:
|
||||
- env: TYPE=style
|
||||
- os: linux
|
||||
- env: TARGET_OS=win32
|
||||
- env: TARGET_OS=win64
|
||||
- env: TARGET_OS=debian-sid TARGET_DEPLOY=True
|
||||
git:
|
||||
depth: false
|
||||
- env: TARGET_OS=debian-sid TARGET_ARCH=i386
|
||||
git:
|
||||
depth: false
|
||||
- compiler: clang
|
||||
env: TARGET_OS=debian-sid
|
||||
git:
|
||||
depth: false
|
||||
- os: osx
|
||||
osx_image: xcode8.3
|
||||
osx_image: xcode9.4
|
||||
before_install:
|
||||
# appdmg doesn't work with old Node.js
|
||||
- if [ "$TRAVIS_OS_NAME" = osx ]; then nvm install 10; fi
|
||||
install: ${TRAVIS_BUILD_DIR}/.travis/install.sh
|
||||
script: ${TRAVIS_BUILD_DIR}/.travis/script.sh
|
||||
after_script: ${TRAVIS_BUILD_DIR}/.travis/after_script.sh
|
||||
before_deploy: make package
|
||||
before_deploy:
|
||||
- if [ "$TARGET_OS" != debian-sid ]; then make package; fi
|
||||
deploy:
|
||||
provider: releases
|
||||
api_key:
|
||||
secure: d4a+x4Gugpss7JK2DcHjyBZDmEFFh4iVfKDfITSD50T6Mc6At4LMgojvEu+6qT6IyOY2vm3UVT6fhyeuWDTRDwW9tfFlaHVA0h8aTRD+eAXOA7pQ8rEMwQO3+WCKuKTfEqUkpL4wxhww8dpkv54tqeIs0S4TBqz9tk8UhzU7XbE=
|
||||
file: lmms-${TRAVIS_TAG:1}-$TARGET_OS.exe
|
||||
file_glob: true
|
||||
file:
|
||||
- lmms-${TRAVIS_TAG:1}-$TARGET_OS.exe
|
||||
- /var/cache/pbuilder/result/lmms_*.tar.xz
|
||||
skip_cleanup: true
|
||||
on:
|
||||
tags: true
|
||||
all_branches: true
|
||||
condition: '("$TARGET_OS" = win??)'
|
||||
condition: '"$TARGET_DEPLOY" = True'
|
||||
repo: LMMS/lmms
|
||||
|
||||
3
.travis/debian_pkgs.sha256
Normal file
@@ -0,0 +1,3 @@
|
||||
314ef4af137903dfb13e8c3ef1e6ea56cfdb23808d52ec4f5f50e288c73610c5 pbuilder_0.229.1_all.deb
|
||||
fa82aa8ed3055c6f6330104deedf080b26778295e589426d4c4dd0f2c2a5defa debootstrap_1.0.95_all.deb
|
||||
2ef4c09f7841b72f93412803ddd142f72658536dbfabe00e449eb548f432f3f8 debian-archive-keyring_2017.7ubuntu1_all.deb
|
||||
@@ -23,4 +23,4 @@ sudo apt-get install -y $PACKAGES
|
||||
sudo add-apt-repository -y ppa:kxstudio-debian/libs
|
||||
sudo add-apt-repository -y ppa:kxstudio-debian/apps
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y carla-git
|
||||
sudo apt-get install -y carla
|
||||
|
||||
@@ -5,5 +5,11 @@ source /opt/qt59/bin/qt59-env.sh
|
||||
|
||||
set -e
|
||||
|
||||
mkdir build
|
||||
cd build
|
||||
|
||||
# shellcheck disable=SC2086
|
||||
cmake -DUSE_WERROR=ON -DCMAKE_INSTALL_PREFIX=../target $CMAKE_FLAGS ..
|
||||
make -j4
|
||||
make tests
|
||||
./tests/tests
|
||||
|
||||
2
.travis/linux.debian-sid.before_install.sh
Executable file
@@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
sudo apt-get update -qq
|
||||
17
.travis/linux.debian-sid.install.sh
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
sudo apt-get install -y \
|
||||
dpkg \
|
||||
pbuilder
|
||||
|
||||
# work around a pbuilder bug which breaks ccache
|
||||
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=666525
|
||||
# and also missing signing keys in Trusty's debian-archive-keyring
|
||||
cd /tmp
|
||||
wget http://archive.ubuntu.com/ubuntu/pool/main/p/pbuilder/pbuilder_0.229.1_all.deb
|
||||
wget http://archive.ubuntu.com/ubuntu/pool/main/d/debootstrap/debootstrap_1.0.95_all.deb
|
||||
wget http://archive.ubuntu.com/ubuntu/pool/universe/d/debian-archive-keyring/debian-archive-keyring_2017.7ubuntu1_all.deb
|
||||
sha256sum -c "$TRAVIS_BUILD_DIR/.travis/debian_pkgs.sha256"
|
||||
sudo dpkg -i pbuilder_0.229.1_all.deb debootstrap_1.0.95_all.deb debian-archive-keyring_2017.7ubuntu1_all.deb
|
||||
cd "$OLDPWD"
|
||||
72
.travis/linux.debian-sid.script.sh
Executable file
@@ -0,0 +1,72 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
: "${TARGET_ARCH:=amd64}"
|
||||
|
||||
BASETGZ="$HOME/pbuilder-bases/debian-sid-$TARGET_ARCH.tgz"
|
||||
MIRROR=http://cdn-fastly.deb.debian.org/debian
|
||||
KEYRING=/usr/share/keyrings/debian-archive-keyring.gpg
|
||||
|
||||
if [ -z "$TRAVIS_TAG" ]
|
||||
then
|
||||
sudo \
|
||||
sh -c "echo CCACHEDIR=$HOME/.ccache >> /etc/pbuilderrc"
|
||||
fi
|
||||
|
||||
if [ "$CC" = clang ]
|
||||
then
|
||||
sudo sh -c "echo EXTRAPACKAGES=clang >> /etc/pbuilderrc"
|
||||
fi
|
||||
|
||||
if [ ! -e "$BASETGZ.stamp" ]
|
||||
then
|
||||
mkdir -p "$HOME/pbuilder-bases"
|
||||
sudo pbuilder --create --basetgz "$BASETGZ" --mirror $MIRROR \
|
||||
--distribution sid --architecture $TARGET_ARCH \
|
||||
--debootstrapopts --variant=buildd \
|
||||
--debootstrapopts --keyring=$KEYRING \
|
||||
--debootstrapopts --include=perl
|
||||
touch "$BASETGZ.stamp"
|
||||
else
|
||||
sudo pbuilder --update --basetgz "$BASETGZ"
|
||||
fi
|
||||
|
||||
sync_version() {
|
||||
local VERSION
|
||||
local MMR
|
||||
local STAGE
|
||||
local EXTRA
|
||||
|
||||
VERSION=$(git describe --tags --match v[0-9].[0-9].[0-9]*)
|
||||
VERSION=${VERSION#v}
|
||||
MMR=${VERSION%%-*}
|
||||
case $VERSION in
|
||||
*-*-*-*)
|
||||
VERSION=${VERSION%-*}
|
||||
STAGE=${VERSION#*-}
|
||||
STAGE=${STAGE%-*}
|
||||
EXTRA=${VERSION##*-}
|
||||
VERSION=$MMR~$STAGE.$EXTRA
|
||||
;;
|
||||
*-*-*)
|
||||
VERSION=${VERSION%-*}
|
||||
EXTRA=${VERSION##*-}
|
||||
VERSION=$MMR.$EXTRA
|
||||
;;
|
||||
*-*)
|
||||
STAGE=${VERSION#*-}
|
||||
VERSION=$MMR~$STAGE
|
||||
;;
|
||||
esac
|
||||
|
||||
sed "1 s/@VERSION@/$VERSION/" -i debian/changelog
|
||||
echo "Set Debian version to $VERSION"
|
||||
}
|
||||
|
||||
sync_version
|
||||
|
||||
DIR="$PWD"
|
||||
cd ..
|
||||
dpkg-source -b "$DIR"
|
||||
env -i CC="$CC" CXX="$CXX" sudo pbuilder --build --debbuildopts "--jobs=auto" \
|
||||
--basetgz "$BASETGZ" ./*.dsc
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
set -e
|
||||
|
||||
CACHE_DIR=$TRAVIS_BUILD_DIR/apt_mingw_cache/$1
|
||||
CACHE_DIR=$HOME/apt_mingw_cache/$1
|
||||
mkdir -p "$CACHE_DIR"
|
||||
|
||||
pushd "$CACHE_DIR"
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
mkdir build
|
||||
cd build
|
||||
|
||||
export CMAKE_OPTS="$CMAKE_FLAGS -DUSE_WERROR=ON"
|
||||
../cmake/build_win32.sh
|
||||
|
||||
make -j4
|
||||
make tests
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
mkdir build
|
||||
cd build
|
||||
|
||||
export CMAKE_OPTS="$CMAKE_FLAGS -DUSE_WERROR=ON"
|
||||
../cmake/build_win64.sh
|
||||
|
||||
make -j4
|
||||
make tests
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
set -e
|
||||
|
||||
PACKAGES="cmake pkg-config libogg libvorbis lame libsndfile libsamplerate jack sdl libgig libsoundio stk fluid-synth portaudio node fltk qt5"
|
||||
PACKAGES="cmake pkg-config libogg libvorbis lame libsndfile libsamplerate jack sdl libgig libsoundio stk fluid-synth portaudio node fltk qt5 carla"
|
||||
|
||||
if "${TRAVIS}"; then
|
||||
PACKAGES="$PACKAGES ccache"
|
||||
@@ -19,4 +19,4 @@ brew install $PACKAGES
|
||||
# fftw tries to install gcc which conflicts with travis
|
||||
brew install fftw --ignore-dependencies
|
||||
|
||||
sudo npm install -g appdmg
|
||||
npm install -g appdmg
|
||||
|
||||
@@ -1,10 +1,16 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
mkdir build
|
||||
cd build
|
||||
|
||||
# Workaround; No FindQt5.cmake module exists
|
||||
CMAKE_PREFIX_PATH="$(brew --prefix qt5)"
|
||||
export CMAKE_PREFIX_PATH
|
||||
|
||||
# shellcheck disable=SC2086
|
||||
cmake -DUSE_WERROR=OFF -DCMAKE_INSTALL_PREFIX=../target $CMAKE_FLAGS ..
|
||||
|
||||
make -j4
|
||||
make tests
|
||||
./tests/tests
|
||||
|
||||
@@ -8,13 +8,11 @@ if [ "$TYPE" = 'style' ]; then
|
||||
# once it's fixed, it should be enabled again
|
||||
# shellcheck disable=SC2185
|
||||
# shellcheck disable=SC2046
|
||||
shellcheck $(find -O3 "$TRAVIS_BUILD_DIR/.travis/" "$TRAVIS_BUILD_DIR/cmake/" -type f -name '*.sh' -o -name "*.sh.in")
|
||||
shellcheck $(find -O3 . -maxdepth 3 -type f -name '*.sh' -o -name "*.sh.in")
|
||||
shellcheck doc/bash-completion/lmms
|
||||
|
||||
else
|
||||
|
||||
mkdir -p build
|
||||
cd build
|
||||
|
||||
export CMAKE_FLAGS="-DCMAKE_BUILD_TYPE=RelWithDebInfo"
|
||||
|
||||
if [ -z "$TRAVIS_TAG" ]; then
|
||||
@@ -23,32 +21,28 @@ else
|
||||
|
||||
"$TRAVIS_BUILD_DIR/.travis/$TRAVIS_OS_NAME.$TARGET_OS.script.sh"
|
||||
|
||||
make -j4
|
||||
|
||||
if [[ $TARGET_OS != win* ]]; then
|
||||
|
||||
make tests
|
||||
tests/tests
|
||||
|
||||
fi
|
||||
|
||||
# Package and upload non-tagged builds
|
||||
if [ ! -z "$TRAVIS_TAG" ]; then
|
||||
# Skip, handled by travis deploy instead
|
||||
exit 0
|
||||
elif [[ $TARGET_OS == win* ]]; then
|
||||
cd build
|
||||
make -j4 package
|
||||
PACKAGE="$(ls lmms-*win*.exe)"
|
||||
elif [[ $TRAVIS_OS_NAME == osx ]]; then
|
||||
cd build
|
||||
make -j4 install > /dev/null
|
||||
make dmg
|
||||
PACKAGE="$(ls lmms-*.dmg)"
|
||||
else
|
||||
elif [[ $TARGET_OS != debian-sid ]]; then
|
||||
cd build
|
||||
make -j4 install > /dev/null
|
||||
make appimage
|
||||
PACKAGE="$(ls lmms-*.AppImage)"
|
||||
fi
|
||||
|
||||
echo "Uploading $PACKAGE to transfer.sh..."
|
||||
curl --upload-file "$PACKAGE" "https://transfer.sh/$PACKAGE" || true
|
||||
# Limit the connection time to 3 minutes and total upload time to 5 minutes
|
||||
# Otherwise the build may hang
|
||||
curl --connect-timeout 180 --max-time 300 --upload-file "$PACKAGE" "https://transfer.sh/$PACKAGE" || true
|
||||
fi
|
||||
|
||||
102
CMakeLists.txt
@@ -1,8 +1,10 @@
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 3.1.0)
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 3.3)
|
||||
|
||||
PROJECT(lmms)
|
||||
|
||||
SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" ${CMAKE_MODULE_PATH})
|
||||
SET(LMMS_BINARY_DIR ${CMAKE_BINARY_DIR})
|
||||
SET(LMMS_SOURCE_DIR ${CMAKE_SOURCE_DIR})
|
||||
|
||||
IF(COMMAND CMAKE_POLICY)
|
||||
CMAKE_POLICY(SET CMP0005 NEW)
|
||||
@@ -13,16 +15,19 @@ IF(COMMAND CMAKE_POLICY)
|
||||
CMAKE_POLICY(SET CMP0050 OLD)
|
||||
ENDIF()
|
||||
CMAKE_POLICY(SET CMP0020 NEW)
|
||||
CMAKE_POLICY(SET CMP0057 NEW)
|
||||
ENDIF(COMMAND CMAKE_POLICY)
|
||||
|
||||
INCLUDE(PluginList)
|
||||
INCLUDE(CheckSubmodules)
|
||||
INCLUDE(AddFileDependencies)
|
||||
INCLUDE(CheckIncludeFiles)
|
||||
INCLUDE(FindPkgConfig)
|
||||
INCLUDE(GenerateExportHeader)
|
||||
|
||||
STRING(TOUPPER "${CMAKE_PROJECT_NAME}" PROJECT_NAME_UCASE)
|
||||
|
||||
SET(PROJECT_YEAR 2018)
|
||||
SET(PROJECT_YEAR 2019)
|
||||
|
||||
SET(PROJECT_AUTHOR "LMMS Developers")
|
||||
SET(PROJECT_URL "https://lmms.io")
|
||||
@@ -31,8 +36,8 @@ SET(PROJECT_DESCRIPTION "${PROJECT_NAME_UCASE} - Free music production software"
|
||||
SET(PROJECT_COPYRIGHT "2008-${PROJECT_YEAR} ${PROJECT_AUTHOR}")
|
||||
SET(VERSION_MAJOR "1")
|
||||
SET(VERSION_MINOR "2")
|
||||
SET(VERSION_RELEASE "0")
|
||||
SET(VERSION_STAGE "rc5")
|
||||
SET(VERSION_RELEASE "1")
|
||||
SET(VERSION_STAGE "")
|
||||
SET(VERSION_BUILD "0")
|
||||
SET(VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_RELEASE}")
|
||||
IF(VERSION_STAGE)
|
||||
@@ -46,7 +51,6 @@ ENDIF()
|
||||
INCLUDE(VersionInfo)
|
||||
INCLUDE(DetectMachine)
|
||||
|
||||
|
||||
OPTION(WANT_ALSA "Include ALSA (Advanced Linux Sound Architecture) support" ON)
|
||||
OPTION(WANT_CALF "Include CALF LADSPA plugins" ON)
|
||||
OPTION(WANT_CAPS "Include C* Audio Plugin Suite (LADSPA plugins)" ON)
|
||||
@@ -58,6 +62,7 @@ OPTION(WANT_MP3LAME "Include MP3/Lame support" ON)
|
||||
OPTION(WANT_OGGVORBIS "Include OGG/Vorbis support" ON)
|
||||
OPTION(WANT_PULSEAUDIO "Include PulseAudio support" ON)
|
||||
OPTION(WANT_PORTAUDIO "Include PortAudio support" ON)
|
||||
OPTION(WANT_SNDIO "Include sndio support" ON)
|
||||
OPTION(WANT_SOUNDIO "Include libsoundio support" ON)
|
||||
OPTION(WANT_SDL "Include SDL (Simple DirectMedia Layer) support" ON)
|
||||
OPTION(WANT_SF2 "Include SoundFont2 player plugin" ON)
|
||||
@@ -66,12 +71,16 @@ OPTION(WANT_STK "Include Stk (Synthesis Toolkit) support" ON)
|
||||
OPTION(WANT_SWH "Include Steve Harris's LADSPA plugins" ON)
|
||||
OPTION(WANT_TAP "Include Tom's Audio Processing LADSPA plugins" ON)
|
||||
OPTION(WANT_VST "Include VST support" ON)
|
||||
OPTION(WANT_VST_NOWINE "Include partial VST support (without wine)" OFF)
|
||||
OPTION(WANT_VST_32 "Include 32-bit VST support" ON)
|
||||
OPTION(WANT_VST_64 "Include 64-bit VST support" ON)
|
||||
OPTION(WANT_WINMM "Include WinMM MIDI support" OFF)
|
||||
OPTION(WANT_DEBUG_FPE "Debug floating point exceptions" OFF)
|
||||
|
||||
|
||||
IF(LMMS_BUILD_APPLE)
|
||||
# Fix linking on 10.14+. See issue #4762 on github
|
||||
LINK_DIRECTORIES(/usr/local/lib)
|
||||
SET(WANT_SOUNDIO OFF)
|
||||
SET(WANT_ALSA OFF)
|
||||
SET(WANT_PULSEAUDIO OFF)
|
||||
SET(WANT_VST OFF)
|
||||
@@ -87,14 +96,13 @@ IF(LMMS_BUILD_WIN32)
|
||||
SET(WANT_ALSA OFF)
|
||||
SET(WANT_JACK OFF)
|
||||
SET(WANT_PULSEAUDIO OFF)
|
||||
SET(WANT_PORTAUDIO OFF)
|
||||
SET(WANT_SNDIO OFF)
|
||||
SET(WANT_SOUNDIO OFF)
|
||||
SET(WANT_WINMM ON)
|
||||
SET(LMMS_HAVE_WINMM TRUE)
|
||||
SET(STATUS_ALSA "<not supported on this platform>")
|
||||
SET(STATUS_JACK "<not supported on this platform>")
|
||||
SET(STATUS_PULSEAUDIO "<not supported on this platform>")
|
||||
SET(STATUS_PORTAUDIO "<disabled on this platform>")
|
||||
SET(STATUS_SOUNDIO "<disabled in this release>")
|
||||
SET(STATUS_WINMM "OK")
|
||||
SET(STATUS_APPLEMIDI "<not supported on this platform>")
|
||||
@@ -136,7 +144,7 @@ CHECK_INCLUDE_FILES(locale.h LMMS_HAVE_LOCALE_H)
|
||||
|
||||
LIST(APPEND CMAKE_PREFIX_PATH "${CMAKE_INSTALL_PREFIX}")
|
||||
|
||||
FIND_PACKAGE(Qt5 COMPONENTS Core Gui Widgets Xml REQUIRED)
|
||||
FIND_PACKAGE(Qt5 5.6.0 COMPONENTS Core Gui Widgets Xml REQUIRED)
|
||||
FIND_PACKAGE(Qt5 COMPONENTS LinguistTools QUIET)
|
||||
|
||||
INCLUDE_DIRECTORIES(
|
||||
@@ -153,7 +161,7 @@ SET(QT_LIBRARIES
|
||||
Qt5::Xml
|
||||
)
|
||||
|
||||
IF(LMMS_BUILD_LINUX)
|
||||
IF(LMMS_BUILD_LINUX AND WANT_VST)
|
||||
FIND_PACKAGE(Qt5 COMPONENTS X11Extras REQUIRED)
|
||||
LIST(APPEND QT_LIBRARIES Qt5::X11Extras)
|
||||
ENDIF()
|
||||
@@ -165,7 +173,7 @@ FIND_PACKAGE(Qt5Test)
|
||||
SET(QT_QTTEST_LIBRARY Qt5::Test)
|
||||
|
||||
# check for libsndfile
|
||||
PKG_CHECK_MODULES(SNDFILE REQUIRED sndfile>=1.0.18)
|
||||
FIND_PACKAGE(SndFile REQUIRED)
|
||||
IF(NOT SNDFILE_FOUND)
|
||||
MESSAGE(FATAL_ERROR "LMMS requires libsndfile1 and libsndfile1-dev >= 1.0.18 - please install, remove CMakeCache.txt and try again!")
|
||||
ENDIF()
|
||||
@@ -212,7 +220,11 @@ ENDIF(WANT_TAP)
|
||||
|
||||
# check for CARLA
|
||||
IF(WANT_CARLA)
|
||||
PKG_CHECK_MODULES(CARLA carla-standalone>=1.9.5)
|
||||
PKG_CHECK_MODULES(CARLA carla-native-plugin)
|
||||
# look for carla under old name
|
||||
IF(NOT CARLA_FOUND)
|
||||
PKG_CHECK_MODULES(CARLA carla-standalone>=1.9.5)
|
||||
ENDIF()
|
||||
IF(CARLA_FOUND)
|
||||
SET(LMMS_HAVE_CARLA TRUE)
|
||||
SET(STATUS_CARLA "OK")
|
||||
@@ -378,7 +390,6 @@ IF(WANT_JACK)
|
||||
SET(LMMS_HAVE_WEAKJACK TRUE)
|
||||
SET(WEAKJACK_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/src/3rdparty/weakjack/weakjack)
|
||||
SET(STATUS_JACK "OK (weak linking enabled)")
|
||||
SET(JACK_INCLUDE_DIRS "")
|
||||
# use dlsym instead
|
||||
SET(JACK_LIBRARIES ${CMAKE_DL_LIBS})
|
||||
ELSE()
|
||||
@@ -386,15 +397,14 @@ IF(WANT_JACK)
|
||||
ENDIF()
|
||||
SET(LMMS_HAVE_JACK TRUE)
|
||||
ELSE(JACK_FOUND)
|
||||
SET(JACK_INCLUDE_DIRS "")
|
||||
SET(STATUS_JACK "not found, please install libjack0.100.0-dev (or similar) "
|
||||
"if you require JACK support")
|
||||
ENDIF(JACK_FOUND)
|
||||
ENDIF(WANT_JACK)
|
||||
|
||||
|
||||
# check for FFTW3F-library
|
||||
PKG_CHECK_MODULES(FFTW3F REQUIRED fftw3f>=3.0.0)
|
||||
|
||||
FIND_PACKAGE(FFTW COMPONENTS fftw3f REQUIRED)
|
||||
|
||||
# check for FLTK
|
||||
FIND_PACKAGE(FLTK)
|
||||
@@ -428,19 +438,20 @@ If(WANT_GIG)
|
||||
ENDIF(WANT_GIG)
|
||||
|
||||
# check for pthreads
|
||||
IF(LMMS_BUILD_LINUX OR LMMS_BUILD_APPLE OR LMMS_BUILD_OPENBSD)
|
||||
IF(LMMS_BUILD_LINUX OR LMMS_BUILD_APPLE OR LMMS_BUILD_OPENBSD OR LMMS_BUILD_FREEBSD)
|
||||
FIND_PACKAGE(Threads)
|
||||
ENDIF(LMMS_BUILD_LINUX OR LMMS_BUILD_APPLE OR LMMS_BUILD_OPENBSD)
|
||||
ENDIF(LMMS_BUILD_LINUX OR LMMS_BUILD_APPLE OR LMMS_BUILD_OPENBSD OR LMMS_BUILD_FREEBSD)
|
||||
|
||||
# check for sndio (openbsd only, roaraudio won't work yet)
|
||||
FIND_PACKAGE(Sndio)
|
||||
IF(LMMS_BUILD_OPENBSD AND SNDIO_FOUND)
|
||||
SET(LMMS_HAVE_SNDIO TRUE)
|
||||
SET(STATUS_SNDIO "OK")
|
||||
ELSE()
|
||||
SET(STATUS_SNDIO "<not found or not supported on this platform>")
|
||||
SET(SNDIO_LIBRARY "")
|
||||
ENDIF()
|
||||
# check for sndio (roaraudio won't work yet)
|
||||
IF(WANT_SNDIO)
|
||||
FIND_PACKAGE(Sndio)
|
||||
IF(SNDIO_FOUND)
|
||||
SET(LMMS_HAVE_SNDIO TRUE)
|
||||
SET(STATUS_SNDIO "OK")
|
||||
ELSE()
|
||||
SET(STATUS_SNDIO "<not found or not supported on this platform>")
|
||||
ENDIF(SNDIO_FOUND)
|
||||
ENDIF(WANT_SNDIO)
|
||||
|
||||
# check for WINE
|
||||
IF(WANT_VST)
|
||||
@@ -476,10 +487,10 @@ ELSE()
|
||||
ENDIF(WANT_DEBUG_FPE)
|
||||
|
||||
# check for libsamplerate
|
||||
PKG_CHECK_MODULES(SAMPLERATE REQUIRED samplerate>=0.1.8)
|
||||
FIND_PACKAGE(Samplerate 0.1.8 MODULE REQUIRED)
|
||||
|
||||
# set compiler flags
|
||||
IF(CMAKE_CXX_COMPILER_ID MATCHES "GNU|AppleClang")
|
||||
IF(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
|
||||
SET(WERROR_FLAGS "-Wall -Werror=unused-function -Wno-sign-compare -Wno-strict-overflow")
|
||||
OPTION(USE_WERROR "Add -werror to the build flags. Stops the build on warnings" OFF)
|
||||
IF(${USE_WERROR})
|
||||
@@ -539,7 +550,7 @@ ENDIF()
|
||||
# we somehow have to make LMMS-binary depend on MOC-files
|
||||
ADD_FILE_DEPENDENCIES("${CMAKE_BINARY_DIR}/lmmsconfig.h")
|
||||
|
||||
IF(CMAKE_CXX_COMPILER_ID MATCHES "GNU|AppleClang")
|
||||
IF(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
|
||||
IF(WIN32)
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-attributes")
|
||||
ELSE(WIN32)
|
||||
@@ -548,17 +559,7 @@ IF(CMAKE_CXX_COMPILER_ID MATCHES "GNU|AppleClang")
|
||||
ENDIF()
|
||||
|
||||
# use ccache
|
||||
OPTION(USE_CCACHE "Use ccache for compilation" OFF)
|
||||
IF(USE_CCACHE)
|
||||
FIND_PROGRAM(CCACHE ccache)
|
||||
IF (CCACHE)
|
||||
MESSAGE(STATUS "Using ccache found in PATH")
|
||||
SET_PROPERTY(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ${CCACHE})
|
||||
SET_PROPERTY(GLOBAL PROPERTY RULE_LAUNCH_LINK ${CCACHE})
|
||||
ELSE()
|
||||
MESSAGE(WARNING "USE_CCACHE enabled, but no ccache found")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
include(CompileCache)
|
||||
|
||||
# make sub-directories
|
||||
ADD_SUBDIRECTORY(cmake)
|
||||
@@ -568,8 +569,8 @@ ADD_SUBDIRECTORY(tests)
|
||||
ADD_SUBDIRECTORY(data)
|
||||
ADD_SUBDIRECTORY(doc)
|
||||
|
||||
# post-install tasks
|
||||
ADD_SUBDIRECTORY(cmake/postinstall)
|
||||
# install tasks
|
||||
ADD_SUBDIRECTORY(cmake/install)
|
||||
|
||||
ADD_CUSTOM_COMMAND(OUTPUT "${CMAKE_BINARY_DIR}/lmms.1.gz"
|
||||
COMMAND gzip -c ${CMAKE_SOURCE_DIR}/doc/lmms.1 > ${CMAKE_BINARY_DIR}/lmms.1.gz
|
||||
@@ -624,6 +625,15 @@ ADD_CUSTOM_TARGET(dist
|
||||
COMMAND tar cjf lmms-${VERSION}-src.tar.bz2 "${TMP}"
|
||||
COMMAND rm -rf "${TMP}")
|
||||
|
||||
|
||||
#
|
||||
# add uninstall-target
|
||||
#
|
||||
ADD_CUSTOM_TARGET(uninstall
|
||||
COMMAND ${CMAKE_COMMAND} -DCMAKE_INSTALL_PREFIX="${CMAKE_INSTALL_PREFIX}" -P "${CMAKE_CURRENT_SOURCE_DIR}/cmake/uninstall.cmake"
|
||||
)
|
||||
|
||||
|
||||
#
|
||||
# display configuration information
|
||||
#
|
||||
@@ -699,4 +709,10 @@ MESSAGE(
|
||||
"-----------------------------------------------------------------\n"
|
||||
"\n\n")
|
||||
|
||||
SET(CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION "${BIN_DIR}")
|
||||
if(MSVC)
|
||||
# We can't set this on the install time according to the configuration
|
||||
SET(CMAKE_INSTALL_DEBUG_LIBRARIES TRUE)
|
||||
SET(CMAKE_INSTALL_UCRT_LIBRARIES TRUE)
|
||||
endif()
|
||||
INCLUDE(InstallRequiredSystemLibraries)
|
||||
|
||||
66
INSTALL.txt
@@ -1,16 +1,28 @@
|
||||
Building LMMS got quite simple since 0.4.0 as everything is managed
|
||||
by cmake now. Therefore make sure you have CMake (>= 2.6.0 recommended) and
|
||||
then run
|
||||
This project uses git submodules and several are required for a successful
|
||||
build. If this tarball was NOT provided with submodules (default), some source
|
||||
dependencies will need to be manually added to src/3rdparty.
|
||||
|
||||
If this project WAS provided with submodules, there are detailed dependencies
|
||||
(e.g. supported compilers, cmake requirements, cross-compilation) at
|
||||
doc/wiki/Compiling.md including platform-specific build instructions (e.g.
|
||||
apt-get, dnf, pacman, etc).
|
||||
|
||||
mkdir build
|
||||
cd build
|
||||
cmake ../
|
||||
make
|
||||
sudo make install
|
||||
Online documentation:
|
||||
|
||||
If your system does not have "sudo", become root with your preferred mechanism
|
||||
and run the "make install" command.
|
||||
https://github.com/LMMS/lmms/wiki/
|
||||
|
||||
Live online chat via Discord (similar to IRC):
|
||||
|
||||
https://lmms.io/chat, Channel #programming
|
||||
|
||||
Basic build steps:
|
||||
|
||||
mkdir build
|
||||
cd build
|
||||
cmake ../
|
||||
make
|
||||
sudo make install
|
||||
# or alternately: su -c 'make install'
|
||||
|
||||
With the above commands an out-of-tree build is performed. You can also run
|
||||
"cmake ." directly in the root of source tree although this is not recommended.
|
||||
@@ -25,21 +37,31 @@ that are going to be built into LMMS or built as plugins. Install the
|
||||
according libraries and development files if a certain feature is not enabled.
|
||||
Then remove CMakeCache.txt and run cmake again.
|
||||
|
||||
If you want to supply an install prefix to cmake, add the flag:
|
||||
For non-root installs, or to install to a non-standard location, provide an
|
||||
install prefix to cmake, using the flag:
|
||||
|
||||
-DCMAKE_INSTALL_PREFIX=<prefix>
|
||||
-DCMAKE_INSTALL_PREFIX=<prefix>
|
||||
|
||||
Where <prefix> can be /usr, /usr/local, /opt, etc. The default is /usr/local.
|
||||
|
||||
|
||||
|
||||
Building with QT5
|
||||
|
||||
First of all please note that CMake >= 2.8.11 is required for building with
|
||||
Qt5 support.
|
||||
The Compilation tutorial (see docs/wiki/Compilation.md)
|
||||
specifically uses <prefix> as "../target" for all non-root installations. This
|
||||
is strongly recommended if developing a patch or a feature. For root
|
||||
installations, <prefix> can be /usr, /usr/local, /opt, etc. For most systems,
|
||||
the default is /usr/local.
|
||||
|
||||
If your Qt5 installation does not reside in standard installation paths,
|
||||
additionally pass e.g.
|
||||
additionally pass:
|
||||
|
||||
-DCMAKE_PREFIX_PATH=/opt/qt53/
|
||||
-DCMAKE_PREFIX_PATH=<prefix>
|
||||
|
||||
Where <prefix> is the location to Qt5 installation, usually /opt/qt5/, etc.
|
||||
|
||||
Important wiki sections:
|
||||
|
||||
doc/wiki/Compiling.md:
|
||||
Dependencies Detailed
|
||||
- Build Toolchain (cmake)
|
||||
- Compiler (gcc, clang)
|
||||
- Libraries (required and optional dependencies)
|
||||
|
||||
doc/wiki/Dependencies-<platform>.md
|
||||
Platform-specific dependencies (Windows, Ubuntu, Fedora, macOS, etc.)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
SET(MACOSX_BUNDLE_ICON_FILE "lmms.icns")
|
||||
SET(MACOSX_BUNDLE_ICON_FILE "icon.icns")
|
||||
SET(MACOSX_BUNDLE_GUI_IDENTIFIER "${PROJECT_NAME_UCASE}")
|
||||
SET(MACOSX_BUNDLE_LONG_VERSION_STRING "${VERSION}")
|
||||
SET(MACOSX_BUNDLE_BUNDLE_NAME "${PROJECT_NAME_UCASE}")
|
||||
|
||||
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 50 KiB |
BIN
cmake/apple/dmg_branding@2x.png
Normal file
|
After Width: | Height: | Size: 113 KiB |
BIN
cmake/apple/icon.icns
Normal file
@@ -58,6 +58,17 @@ install_name_tool -change @rpath/libZynAddSubFxCore.dylib \
|
||||
install_name_tool -change @rpath/libZynAddSubFxCore.dylib \
|
||||
@loader_path/../../$zynfmk \
|
||||
"$APP/Contents/$zynlib"
|
||||
|
||||
# Replace @rpath with @loader_path for Carla
|
||||
# See also plugins/carlabase/CMakeLists.txt
|
||||
# This MUST be done BEFORE calling macdeployqt
|
||||
install_name_tool -change @rpath/libcarlabase.dylib \
|
||||
@loader_path/libcarlabase.dylib \
|
||||
"$APP/Contents/lib/lmms/libcarlapatchbay.so"
|
||||
|
||||
install_name_tool -change @rpath/libcarlabase.dylib \
|
||||
@loader_path/libcarlabase.dylib \
|
||||
"$APP/Contents/lib/lmms/libcarlarack.so"
|
||||
|
||||
# Link lmms binary
|
||||
_executables="${_executables} -executable=$APP/Contents/$zynbin"
|
||||
@@ -79,6 +90,28 @@ done
|
||||
# shellcheck disable=SC2086
|
||||
macdeployqt "$APP" $_executables
|
||||
|
||||
# Carla is a standalone plugin. Remove library, look for it side-by-side LMMS.app
|
||||
# This MUST be done AFTER calling macdeployqt
|
||||
#
|
||||
# For example:
|
||||
# /Applications/LMMS.app
|
||||
# /Applications/Carla.app
|
||||
carlalibs=$(echo "@CARLA_LIBRARIES@"|tr ";" "\n")
|
||||
|
||||
# Loop over all libcarlas, fix linking
|
||||
for file in "$APP/Contents/lib/lmms/"libcarla*; do
|
||||
_thisfile="$APP/Contents/lib/lmms/${file##*/}"
|
||||
for lib in $carlalibs; do
|
||||
_oldpath="../../Frameworks/lib${lib}.dylib"
|
||||
_newpath="Carla.app/Contents/MacOS/lib${lib}.dylib"
|
||||
# shellcheck disable=SC2086
|
||||
install_name_tool -change @loader_path/$_oldpath \
|
||||
@executable_path/../../../$_newpath \
|
||||
"$_thisfile"
|
||||
rm -f "$APP/Contents/Frameworks/lib${lib}.dylib"
|
||||
done
|
||||
done
|
||||
|
||||
# Cleanup
|
||||
rm -rf "$APP/Contents/bin"
|
||||
echo -e "\nFinished.\n\n"
|
||||
|
||||
@@ -147,5 +147,7 @@
|
||||
<string>NSApplication</string>
|
||||
<key>NSHighResolutionCapable</key>
|
||||
<string>True</string>
|
||||
<key>NSRequiresAquaSystemAppearance</key>
|
||||
<string>False</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
{
|
||||
"title": "@MACOSX_BUNDLE_BUNDLE_NAME@ @MACOSX_BUNDLE_LONG_VERSION_STRING@",
|
||||
"background": "@CMAKE_SOURCE_DIR@/cmake/apple/dmg_branding.png",
|
||||
"icon-size": 72,
|
||||
"icon-size": 128,
|
||||
"contents": [
|
||||
{ "x": 460, "y": 260, "type": "link", "path": "/Applications" },
|
||||
{ "x": 220, "y": 260, "type": "file", "path": "@CMAKE_BINARY_DIR@/@MACOSX_BUNDLE_BUNDLE_NAME@.app" }
|
||||
{ "x": 139, "y": 200, "type": "file", "path": "@CMAKE_BINARY_DIR@/@MACOSX_BUNDLE_BUNDLE_NAME@.app" },
|
||||
{ "x": 568, "y": 200, "type": "link", "path": "/Applications" }
|
||||
]
|
||||
}
|
||||
|
||||
@@ -37,4 +37,4 @@ fi
|
||||
CMAKE_OPTS="-DCMAKE_PREFIX_PATH=$MINGW $CMAKE_OPTS"
|
||||
|
||||
# shellcheck disable=SC2086
|
||||
cmake "$DIR/.." -DCMAKE_TOOLCHAIN_FILE="$TOOLCHAIN" -DCMAKE_MODULE_PATH="$DIR/../cmake/modules/" $CMAKE_OPTS
|
||||
cmake "$DIR/.." -DCMAKE_TOOLCHAIN_FILE="$TOOLCHAIN" $CMAKE_OPTS
|
||||
|
||||
41
cmake/install/CMakeLists.txt
Normal file
@@ -0,0 +1,41 @@
|
||||
SET(PLUGIN_FILES "")
|
||||
IF(LMMS_BUILD_WIN32)
|
||||
INSTALL(FILES $<TARGET_FILE:Qt5::QWindowsIntegrationPlugin> DESTINATION platforms)
|
||||
ENDIF()
|
||||
|
||||
IF(LMMS_BUILD_WIN32 OR LMMS_INSTALL_DEPENDENCIES)
|
||||
include(InstallTargetDependencies)
|
||||
|
||||
# Collect directories to search for DLLs
|
||||
GET_FILENAME_COMPONENT(QTBIN_DIR "${QT_QMAKE_EXECUTABLE}" PATH)
|
||||
set(LIB_DIRS "${QTBIN_DIR}")
|
||||
|
||||
GET_PROPERTY(PLUGINS_BUILT GLOBAL PROPERTY PLUGINS_BUILT)
|
||||
|
||||
IF(LMMS_BUILD_WIN32)
|
||||
SET(LMMS_DEP_DESTINATION ${BIN_DIR})
|
||||
SET(PLUGIN_DEP_DESTINATION ${BIN_DIR})
|
||||
ELSE()
|
||||
SET(LMMS_DEP_DESTINATION ${LIB_DIR})
|
||||
SET(PLUGIN_DEP_DESTINATION ${LIB_DIR})
|
||||
ENDIF()
|
||||
|
||||
INSTALL_TARGET_DEPENDENCIES(
|
||||
NAME "main_binary"
|
||||
TARGETS lmms
|
||||
DESTINATION "${LMMS_DEP_DESTINATION}"
|
||||
LIB_DIRS ${LIB_DIRS}
|
||||
)
|
||||
|
||||
INSTALL_TARGET_DEPENDENCIES(
|
||||
NAME "plugins"
|
||||
TARGETS ${PLUGINS_BUILT}
|
||||
DESTINATION ${PLUGIN_DEP_DESTINATION}
|
||||
LIB_DIRS ${LIB_DIRS} "${PLUGIN_DIR}"
|
||||
)
|
||||
ENDIF()
|
||||
|
||||
IF(LMMS_BUILD_APPLE)
|
||||
INSTALL(CODE "EXECUTE_PROCESS(COMMAND chmod u+x ${CMAKE_BINARY_DIR}/install_apple.sh)")
|
||||
INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${CMAKE_BINARY_DIR}/install_apple.sh)")
|
||||
ENDIF()
|
||||
23
cmake/install/excludelist-win
Normal file
@@ -0,0 +1,23 @@
|
||||
# List of DLLs considered to be system libraries.
|
||||
# This is needed when cross-compiling for Windows.
|
||||
ADVAPI32.dll
|
||||
COMCTL32.dll
|
||||
comdlg32.dll
|
||||
dwmapi.dll
|
||||
GDI32.dll
|
||||
IMM32.dll
|
||||
KERNEL32.dll
|
||||
MPR.DLL
|
||||
msvcrt.dll
|
||||
ole32.dll
|
||||
OLEAUT32.dll
|
||||
OPENGL32.DLL
|
||||
SHELL32.dll
|
||||
USER32.dll
|
||||
UxTheme.dll
|
||||
VERSION.dll
|
||||
WINMM.DLL
|
||||
WS2_32.dll
|
||||
RPCRT4.dll
|
||||
dsound.dll
|
||||
SETUPAPI.dll
|
||||
@@ -1,5 +1,4 @@
|
||||
INSTALL(FILES lmms.svg DESTINATION "${DATA_DIR}/icons/hicolor/scalable/apps")
|
||||
INSTALL(FILES project.svg DESTINATION "${DATA_DIR}/icons/hicolor/scalable/mimetypes/" RENAME "application-x-lmms-project.svg")
|
||||
INSTALL(DIRECTORY icons/ DESTINATION "${DATA_DIR}/icons/hicolor")
|
||||
INSTALL(FILES lmms.desktop DESTINATION "${DATA_DIR}/applications")
|
||||
INSTALL(FILES lmms.xml DESTINATION "${DATA_DIR}/mime/packages")
|
||||
|
||||
|
||||
BIN
cmake/linux/icons/128x128/apps/lmms.png
Normal file
|
After Width: | Height: | Size: 4.4 KiB |
|
After Width: | Height: | Size: 2.7 KiB |
BIN
cmake/linux/icons/128x128@2/apps/lmms.png
Normal file
|
After Width: | Height: | Size: 8.5 KiB |
|
After Width: | Height: | Size: 5.2 KiB |
BIN
cmake/linux/icons/16x16/apps/lmms.png
Normal file
|
After Width: | Height: | Size: 549 B |
BIN
cmake/linux/icons/16x16/mimetypes/application-x-lmms-project.png
Normal file
|
After Width: | Height: | Size: 446 B |
BIN
cmake/linux/icons/16x16@2/apps/lmms.png
Normal file
|
After Width: | Height: | Size: 934 B |
|
After Width: | Height: | Size: 771 B |
BIN
cmake/linux/icons/24x24/apps/lmms.png
Normal file
|
After Width: | Height: | Size: 799 B |
BIN
cmake/linux/icons/24x24/mimetypes/application-x-lmms-project.png
Normal file
|
After Width: | Height: | Size: 681 B |
BIN
cmake/linux/icons/24x24@2/apps/lmms.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
BIN
cmake/linux/icons/32x32/apps/lmms.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
cmake/linux/icons/32x32/mimetypes/application-x-lmms-project.png
Normal file
|
After Width: | Height: | Size: 836 B |
BIN
cmake/linux/icons/32x32@2/apps/lmms.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
BIN
cmake/linux/icons/48x48/apps/lmms.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
cmake/linux/icons/48x48/mimetypes/application-x-lmms-project.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
cmake/linux/icons/48x48@2/apps/lmms.png
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 2.1 KiB |
BIN
cmake/linux/icons/64x64/apps/lmms.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
cmake/linux/icons/64x64/mimetypes/application-x-lmms-project.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
cmake/linux/icons/64x64@2/apps/lmms.png
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
|
After Width: | Height: | Size: 2.7 KiB |
142
cmake/linux/icons/scalable/apps/lmms.svg
Normal file
@@ -0,0 +1,142 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="64"
|
||||
height="64"
|
||||
id="svg4034"
|
||||
version="1.1"
|
||||
inkscape:version="0.92.3 (2405546, 2018-03-11)"
|
||||
inkscape:export-filename="64x64@2.png"
|
||||
inkscape:export-xdpi="192"
|
||||
inkscape:export-ydpi="192"
|
||||
sodipodi:docname="lmms.svg">
|
||||
<defs
|
||||
id="defs4036">
|
||||
<filter
|
||||
inkscape:collect="always"
|
||||
style="color-interpolation-filters:sRGB"
|
||||
id="filter4173"
|
||||
x="-0.011714286"
|
||||
width="1.0234286"
|
||||
y="-0.0123"
|
||||
height="1.0246">
|
||||
<feGaussianBlur
|
||||
inkscape:collect="always"
|
||||
stdDeviation="0.205"
|
||||
id="feGaussianBlur4175" />
|
||||
</filter>
|
||||
<linearGradient
|
||||
gradientTransform="translate(0,32)"
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient4244-6"
|
||||
id="linearGradient866"
|
||||
x1="35"
|
||||
y1="-14"
|
||||
x2="35"
|
||||
y2="27"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<linearGradient
|
||||
id="linearGradient4244-6"
|
||||
inkscape:collect="always">
|
||||
<stop
|
||||
id="stop4428"
|
||||
offset="0"
|
||||
style="stop-color:#27ab5f;stop-opacity:1" />
|
||||
<stop
|
||||
id="stop4430"
|
||||
offset="1"
|
||||
style="stop-color:#249a56;stop-opacity:1" />
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="1.4142135"
|
||||
inkscape:cx="210.86487"
|
||||
inkscape:cy="3.375495"
|
||||
inkscape:current-layer="svg4034"
|
||||
showgrid="true"
|
||||
inkscape:grid-bbox="true"
|
||||
inkscape:document-units="px"
|
||||
inkscape:window-width="1366"
|
||||
inkscape:window-height="705"
|
||||
inkscape:window-x="253"
|
||||
inkscape:window-y="1072"
|
||||
inkscape:window-maximized="1"
|
||||
showguides="false"
|
||||
inkscape:guide-bbox="true"
|
||||
inkscape:snap-bbox="true"
|
||||
inkscape:object-nodes="true">
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid4042" />
|
||||
<sodipodi:guide
|
||||
position="37,4"
|
||||
orientation="0,1"
|
||||
id="guide4951"
|
||||
inkscape:locked="false" />
|
||||
<sodipodi:guide
|
||||
position="38,60"
|
||||
orientation="0,1"
|
||||
id="guide4955"
|
||||
inkscape:locked="false" />
|
||||
<sodipodi:guide
|
||||
position="-19,32"
|
||||
orientation="0,1"
|
||||
id="guide4957"
|
||||
inkscape:locked="false" />
|
||||
</sodipodi:namedview>
|
||||
<metadata
|
||||
id="metadata4039">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<rect
|
||||
rx="4"
|
||||
y="4"
|
||||
x="4"
|
||||
height="56"
|
||||
width="56"
|
||||
id="rect5093"
|
||||
style="display:inline;opacity:0.98999999;fill:#34d07b;fill-opacity:1;stroke:none;stroke-opacity:1" />
|
||||
<rect
|
||||
rx="3"
|
||||
y="5"
|
||||
x="5"
|
||||
height="54"
|
||||
width="54"
|
||||
id="rect5095"
|
||||
style="display:inline;opacity:1;fill:url(#linearGradient866);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<path
|
||||
sodipodi:nodetypes="ccccccccccccccccc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path5085-3-6"
|
||||
d="M 32,13 11,25 v 24 l 7,4 7,-4 v -8 l -7,-4 v -8 l 14,-8 14,8 v 8 l -7,4 v 8 l 7,4 7,-4 V 25 Z"
|
||||
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;baseline-shift:baseline;text-anchor:start;white-space:normal;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:0.15;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.97797471;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;filter:url(#filter4173);color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
|
||||
<path
|
||||
sodipodi:nodetypes="ccccccccccccccccc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path5085-3"
|
||||
d="M 32,11 11,23 v 24 l 7,4 7,-4 v -8 l -7,-4 v -8 l 14,-8 14,8 v 8 l -7,4 v 8 l 7,4 7,-4 V 23 Z"
|
||||
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;baseline-shift:baseline;text-anchor:start;white-space:normal;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.97797471;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;filter:url(#filter5497);color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 6.0 KiB |
@@ -0,0 +1,173 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="64"
|
||||
height="64"
|
||||
id="svg4034"
|
||||
version="1.1"
|
||||
inkscape:version="0.91 r13725"
|
||||
inkscape:export-filename="/home/umcaruje/d/Dropbox/lmms icons/project-256x256.png"
|
||||
inkscape:export-xdpi="360"
|
||||
inkscape:export-ydpi="360"
|
||||
sodipodi:docname="application-x-lmms-project.svg"
|
||||
enable-background="new">
|
||||
<defs
|
||||
id="defs4036">
|
||||
<linearGradient
|
||||
id="linearGradient4244-6"
|
||||
inkscape:collect="always">
|
||||
<stop
|
||||
id="stop4428"
|
||||
offset="0"
|
||||
style="stop-color:#27ab5f;stop-opacity:1" />
|
||||
<stop
|
||||
id="stop4430"
|
||||
offset="1"
|
||||
style="stop-color:#249a56;stop-opacity:1" />
|
||||
</linearGradient>
|
||||
<filter
|
||||
inkscape:collect="always"
|
||||
style="color-interpolation-filters:sRGB"
|
||||
id="filter4400"
|
||||
x="-0.024"
|
||||
width="1.048"
|
||||
y="-0.024"
|
||||
height="1.048">
|
||||
<feGaussianBlur
|
||||
inkscape:collect="always"
|
||||
stdDeviation="0.14999999"
|
||||
id="feGaussianBlur4402" />
|
||||
</filter>
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient4244-6"
|
||||
id="linearGradient4432"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="9.8838835"
|
||||
y1="-9.8994951"
|
||||
x2="10.275496"
|
||||
y2="27.930717" />
|
||||
<filter
|
||||
inkscape:collect="always"
|
||||
style="color-interpolation-filters:sRGB"
|
||||
id="filter4442"
|
||||
x="-0.0116"
|
||||
width="1.0232"
|
||||
y="-0.012428571"
|
||||
height="1.0248571">
|
||||
<feGaussianBlur
|
||||
inkscape:collect="always"
|
||||
stdDeviation="0.145"
|
||||
id="feGaussianBlur4444" />
|
||||
</filter>
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="5.6568542"
|
||||
inkscape:cx="4.2102935"
|
||||
inkscape:cy="18.651114"
|
||||
inkscape:current-layer="g4263"
|
||||
showgrid="false"
|
||||
inkscape:grid-bbox="true"
|
||||
inkscape:document-units="px"
|
||||
inkscape:window-width="1366"
|
||||
inkscape:window-height="740"
|
||||
inkscape:window-x="339"
|
||||
inkscape:window-y="1080"
|
||||
inkscape:window-maximized="1"
|
||||
showguides="false"
|
||||
inkscape:guide-bbox="true"
|
||||
inkscape:snap-bbox="true"
|
||||
inkscape:object-nodes="true">
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid4042" />
|
||||
<sodipodi:guide
|
||||
position="37,4"
|
||||
orientation="0,1"
|
||||
id="guide4951" />
|
||||
<sodipodi:guide
|
||||
position="38,60"
|
||||
orientation="0,1"
|
||||
id="guide4955" />
|
||||
<sodipodi:guide
|
||||
position="-19,32"
|
||||
orientation="0,1"
|
||||
id="guide4957" />
|
||||
</sodipodi:namedview>
|
||||
<metadata
|
||||
id="metadata4039">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="g4263"
|
||||
inkscape:label="mimetype"
|
||||
style="display:inline">
|
||||
<g
|
||||
id="g4189">
|
||||
<path
|
||||
sodipodi:nodetypes="ssssssccccs"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path4273"
|
||||
d="m 10,-30 c -1.108,0 -2,0.892 -2,2 l 0,56 c 0,1.108 0.892,2 2,2 l 44,0 c 1.108,0 2,-0.892 2,-2 l 0,-43 c 0,-1 -1,-2 -1,-2 L 43,-29 c 0,0 -1,-1 -2,-1 z"
|
||||
style="display:inline;opacity:1;fill:#34d07b;fill-opacity:1;stroke:none;stroke-opacity:1"
|
||||
transform="translate(0,32)" />
|
||||
<path
|
||||
sodipodi:nodetypes="sssssscccs"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path4275"
|
||||
d="m 10,-29 c -0.554,0 -1,0.446 -1,1 l 0,56 c 0,0.554 0.446,1 1,1 l 44,0 c 0.554,0 1,-0.446 1,-1 l 0,-43 -13,-1 -1,-13 z"
|
||||
style="display:inline;opacity:1;fill:url(#linearGradient4432);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
transform="translate(0,32)" />
|
||||
<path
|
||||
sodipodi:nodetypes="ccccccc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path4339-5"
|
||||
d="m 40,-29 0,11.999999 c 0,2 1,3 3,3 l 11.999999,0 0,-1 L 41,-29 Z"
|
||||
style="display:inline;opacity:0.12999998;fill:#222222;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter4400)"
|
||||
transform="translate(0,32)" />
|
||||
<path
|
||||
sodipodi:nodetypes="ccccccc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path4339"
|
||||
d="m 41,-29 0,12 c 0,1.03125 0.9375,2 2,2 l 12,0 0,-1 -13,-13 z"
|
||||
style="display:inline;fill:#34d07b;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
transform="translate(0,32)" />
|
||||
<path
|
||||
sodipodi:nodetypes="ccccccccccccccccc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path4436"
|
||||
d="m 32,22 -15,8 0,17.5 5,2.5 4.999999,-2.5 0,-6 L 22,39 l 0,-6 10,-5.5 10,5.5 0,6 -4.999999,2.5 0,6 L 42,50 47,47.5 47,30 Z"
|
||||
style="display:inline;color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;baseline-shift:baseline;text-anchor:start;white-space:normal;clip-rule:nonzero;overflow:visible;visibility:visible;opacity:0.15;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.97797471;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;filter:url(#filter4442);color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
|
||||
<path
|
||||
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;baseline-shift:baseline;text-anchor:start;white-space:normal;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.97797471;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;filter:url(#filter5497);color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||
d="m 32,20 -15,8 0,17.5 5,2.5 4.999999,-2.5 0,-6 L 22,37 l 0,-6 10,-5.5 10,5.5 0,6 -4.999999,2.5 0,6 L 42,48 47,45.5 47,28 Z"
|
||||
id="path4265"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccccccccccccccccc" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 7.8 KiB |
@@ -3,14 +3,14 @@ Name=LMMS
|
||||
GenericName=Music production suite
|
||||
GenericName[ca]=Programari de producció musical
|
||||
GenericName[de]=Software zur Musik-Produktion
|
||||
GenericName[fr]=Ensemble pour la production musicale
|
||||
GenericName[fr]=Suite de production musicale
|
||||
GenericName[pl]=Narzędzia do produkcji muzyki
|
||||
Comment=Music sequencer and synthesizer
|
||||
Comment[ca]=Producció fàcil de música per a tothom!
|
||||
Comment[fr]=Production facile de musique pour tout le monde !
|
||||
Comment[fr]=Séquenceur et synthétiseur de musique
|
||||
Comment[pl]=Prosta produkcja muzyki dla każdego!
|
||||
Icon=lmms
|
||||
Exec=env QT_X11_NO_NATIVE_MENUBAR=1 QT_AUTO_SCREEN_SCALE_FACTOR=1 lmms %f
|
||||
Exec=lmms %f
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Categories=Qt;AudioVideo;Audio;Midi;
|
||||
|
||||
|
Before Width: | Height: | Size: 93 KiB |
1540
cmake/linux/lmms.svg
|
Before Width: | Height: | Size: 54 KiB |
@@ -57,6 +57,7 @@ PATH="$(pwd -P)/squashfs-root/usr/bin:$(dirname "@QT_QMAKE_EXECUTABLE@")":$PATH
|
||||
export PATH
|
||||
|
||||
# Fetch portable linuxdeployqt if not in PATH
|
||||
APPIMAGETOOL="squashfs-root/usr/bin/appimagetool"
|
||||
echo -e "\nDownloading linuxdeployqt to ${LINUXDEPLOYQT}..."
|
||||
if env -i which linuxdeployqt > /dev/null 2>&1; then
|
||||
skipped "System already provides this utility"
|
||||
@@ -73,9 +74,10 @@ else
|
||||
success "Downloaded $LINUXDEPLOYQT"
|
||||
# Extract AppImage and replace LINUXDEPLOYQT variable with extracted binary
|
||||
# to support systems without fuse
|
||||
# Also, we need to set LD_LIBRARY_PATH, but linuxdepoyqt's AppRun unsets it
|
||||
# See https://github.com/probonopd/linuxdeployqt/pull/370/
|
||||
"$LINUXDEPLOYQT" --appimage-extract > /dev/null 2>&1
|
||||
LINUXDEPLOYQT="squashfs-root/AppRun"
|
||||
APPIMAGETOOL="squashfs-root/usr/bin/appimagetool"
|
||||
LINUXDEPLOYQT="squashfs-root/usr/bin/linuxdeployqt"
|
||||
success "Extracted $APPIMAGETOOL"
|
||||
fi
|
||||
|
||||
@@ -101,8 +103,9 @@ mv "${APPDIR}usr/bin/lmms" "${APPDIR}usr/bin/lmms.real"
|
||||
cat >"${APPDIR}usr/bin/lmms" <<EOL
|
||||
#!/usr/bin/env bash
|
||||
DIR="\$( cd "\$( dirname "\${BASH_SOURCE[0]}" )" && pwd )"
|
||||
export PATH="\$PATH:/sbin"
|
||||
if which carla > /dev/null 2>&1; then
|
||||
CARLAPATH="$(which carla)"
|
||||
CARLAPATH="\$(which carla)"
|
||||
CARLAPREFIX="\${CARLAPATH%/bin*}"
|
||||
echo "Carla appears to be installed on this system at \$CARLAPREFIX/lib[64]/carla so we'll use it."
|
||||
export LD_LIBRARY_PATH=\$CARLAPREFIX/lib/carla:\$CARLAPREFIX/lib64/carla:\$LD_LIBRARY_PATH
|
||||
@@ -126,26 +129,32 @@ EOL
|
||||
|
||||
chmod +x "${APPDIR}usr/bin/lmms"
|
||||
|
||||
# Per https://github.com/probonopd/linuxdeployqt/issues/129
|
||||
# Per https://github.com/probonopd/linuxdeployqt/issues/129
|
||||
unset LD_LIBRARY_PATH
|
||||
|
||||
# Ensure linuxdeployqt can find shared objects
|
||||
export LD_LIBRARY_PATH="${APPDIR}usr/lib/lmms/":$LD_LIBRARY_PATH
|
||||
|
||||
# Handle wine linking
|
||||
if [ -d "@WINE_LIBRARY_FIX@" ]; then
|
||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:@WINE_LIBRARY_FIX@:@WINE_LIBRARY_FIX@wine/
|
||||
if [ -d "@WINE_32_LIBRARY_DIR@" ]; then
|
||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:@WINE_32_LIBRARY_DIRS@
|
||||
fi
|
||||
if [ -d "@WINE_64_LIBRARY_DIR@" ]; then
|
||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:@WINE_64_LIBRARY_DIRS@
|
||||
fi
|
||||
|
||||
# Move executables so linuxdeployqt can find them
|
||||
ZYNLIB="${APPDIR}usr/lib/lmms/RemoteZynAddSubFx"
|
||||
VSTLIB="${APPDIR}usr/lib/lmms/RemoteVstPlugin.exe.so"
|
||||
VSTLIB32="${APPDIR}usr/lib/lmms/32/RemoteVstPlugin32.exe.so"
|
||||
VSTLIB64="${APPDIR}usr/lib/lmms/RemoteVstPlugin64.exe.so"
|
||||
|
||||
ZYNBIN="${APPDIR}usr/bin/RemoteZynAddSubFx"
|
||||
VSTBIN="${APPDIR}usr/bin/RemoteVstPlugin.exe.so"
|
||||
VSTBIN32="${APPDIR}usr/bin/RemoteVstPlugin32.exe.so"
|
||||
VSTBIN64="${APPDIR}usr/bin/RemoteVstPlugin64.exe.so"
|
||||
|
||||
mv "$ZYNLIB" "$ZYNBIN"
|
||||
mv "$VSTLIB" "$VSTBIN"
|
||||
mv "$VSTLIB32" "$VSTBIN32"
|
||||
mv "$VSTLIB64" "$VSTBIN64"
|
||||
|
||||
# Patch the desktop file
|
||||
sed -i 's/.*Exec=.*/Exec=lmms.real/' "$DESKTOPFILE"
|
||||
@@ -156,7 +165,8 @@ for file in "${APPDIR}usr/lib/lmms/"*.so; do
|
||||
executables="${executables} -executable=$thisfile"
|
||||
done
|
||||
executables="${executables} -executable=${ZYNBIN}"
|
||||
executables="${executables} -executable=${VSTBIN}"
|
||||
executables="${executables} -executable=${VSTBIN32}"
|
||||
executables="${executables} -executable=${VSTBIN64}"
|
||||
executables="${executables} -executable=${APPDIR}usr/lib/lmms/ladspa/imp_1199.so"
|
||||
executables="${executables} -executable=${APPDIR}usr/lib/lmms/ladspa/imbeq_1197.so"
|
||||
executables="${executables} -executable=${APPDIR}usr/lib/lmms/ladspa/pitch_scale_1193.so"
|
||||
@@ -165,13 +175,15 @@ executables="${executables} -executable=${APPDIR}usr/lib/lmms/ladspa/pitch_scale
|
||||
# Bundle both qt and non-qt dependencies into appimage format
|
||||
echo -e "\nBundling and relinking system dependencies..."
|
||||
echo -e ">>>>> linuxdeployqt" > "$LOGFILE"
|
||||
|
||||
# shellcheck disable=SC2086
|
||||
"$LINUXDEPLOYQT" "$DESKTOPFILE" $executables -bundle-non-qt-libs -verbose=$VERBOSITY $STRIP >> "$LOGFILE" 2>&1
|
||||
success "Bundled and relinked dependencies"
|
||||
|
||||
# Link to original location so lmms can find them
|
||||
ln -sr "$ZYNBIN" "$ZYNLIB"
|
||||
ln -sr "$VSTBIN" "$VSTLIB"
|
||||
ln -sr "$VSTBIN32" "$VSTLIB32"
|
||||
ln -sr "$VSTBIN64" "$VSTLIB64"
|
||||
|
||||
# Remove wine library conflict
|
||||
rm -f "${APPDIR}/usr/lib/libwine.so.1"
|
||||
@@ -179,12 +191,22 @@ rm -f "${APPDIR}/usr/lib/libwine.so.1"
|
||||
# Use system-provided carla
|
||||
rm -f "${APPDIR}usr/lib/"libcarla*.so
|
||||
|
||||
# Move jack out of LD_LIBRARY_PATH
|
||||
# Remove bundled jack in LD_LIBRARY_PATH if exists
|
||||
if [ -e "${APPDIR}/usr/lib/libjack.so.0" ]; then
|
||||
mkdir -p "${APPDIR}usr/lib/lmms/optional/"
|
||||
mv "${APPDIR}/usr/lib/libjack.so.0" "${APPDIR}usr/lib/lmms/optional/"
|
||||
rm "${APPDIR}/usr/lib/libjack.so.0"
|
||||
fi
|
||||
|
||||
# Bundle jack out of LD_LIBRARY_PATH
|
||||
JACK_LIB=$(ldd "${APPDIR}/usr/bin/lmms.real" | sed -n 's/\tlibjack\.so\.0 => \(.\+\) (0x[0-9a-f]\+)/\1/p')
|
||||
if [ -e "$JACK_LIB" ]; then
|
||||
mkdir -p "${APPDIR}usr/lib/lmms/optional/"
|
||||
cp "$JACK_LIB" "${APPDIR}usr/lib/lmms/optional/"
|
||||
fi
|
||||
|
||||
# Point the AppRun to the shim launcher
|
||||
rm -f "${APPDIR}/AppRun"
|
||||
ln -sr "${APPDIR}/usr/bin/lmms" "${APPDIR}/AppRun"
|
||||
|
||||
# Create AppImage
|
||||
echo -e "\nFinishing the AppImage..."
|
||||
echo -e "\n\n>>>>> appimagetool" >> "$LOGFILE"
|
||||
|
||||
|
Before Width: | Height: | Size: 66 KiB |
93
cmake/modules/BashCompletion.cmake
Normal file
@@ -0,0 +1,93 @@
|
||||
# A wrapper around pkg-config-provided and cmake-provided bash completion that
|
||||
# will have dynamic behavior at INSTALL() time to allow both root-level
|
||||
# INSTALL() as well as user-level INSTALL().
|
||||
#
|
||||
# See also https://github.com/scop/bash-completion
|
||||
#
|
||||
# Copyright (c) 2018, Tres Finocchiaro, <tres.finocchiaro@gmail.com>
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
||||
#
|
||||
# Usage:
|
||||
# INCLUDE(BashCompletion)
|
||||
# BASHCOMP_INSTALL(foo)
|
||||
# ... where "foo" is a shell script adjacent to the CMakeLists.txt
|
||||
#
|
||||
# How it determines BASHCOMP_PKG_PATH, in order:
|
||||
# 1. Uses BASHCOMP_PKG_PATH if already set (e.g. -DBASHCOMP_PKG_PATH=...)
|
||||
# a. If not, uses pkg-config's PKG_CHECK_MODULES to determine path
|
||||
# b. Fallback to cmake's FIND_PACKAGE(bash-completion) path
|
||||
# c. Fallback to hard-coded /usr/share/bash-completion/completions
|
||||
# 2. Final fallback to ${CMAKE_INSTALL_PREFIX}/share/bash-completion/completions if
|
||||
# detected path is unwritable.
|
||||
|
||||
# - Windows does not support bash completion
|
||||
# - macOS support should eventually be added for Homebrew (TODO)
|
||||
IF(WIN32)
|
||||
MESSAGE(STATUS "Bash competion is not supported on this platform.")
|
||||
ELSEIF(APPLE)
|
||||
MESSAGE(STATUS "Bash completion is not yet implemented for this platform.")
|
||||
ELSE()
|
||||
INCLUDE(FindUnixCommands)
|
||||
# Honor manual override if provided
|
||||
IF(NOT BASHCOMP_PKG_PATH)
|
||||
# First, use pkg-config, which is the most reliable
|
||||
FIND_PACKAGE(PkgConfig QUIET)
|
||||
IF(PKGCONFIG_FOUND)
|
||||
PKG_CHECK_MODULES(BASH_COMPLETION bash-completion)
|
||||
PKG_GET_VARIABLE(BASHCOMP_PKG_PATH bash-completion completionsdir)
|
||||
ELSE()
|
||||
# Second, use cmake (preferred but less common)
|
||||
FIND_PACKAGE(bash-completion QUIET)
|
||||
IF(BASH_COMPLETION_FOUND)
|
||||
SET(BASHCOMP_PKG_PATH "${BASH_COMPLETION_COMPLETIONSDIR}")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
# Third, use a hard-coded fallback value
|
||||
IF("${BASHCOMP_PKG_PATH}" STREQUAL "")
|
||||
SET(BASHCOMP_PKG_PATH "/usr/share/bash-completion/completions")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
# Always provide a fallback for non-root INSTALL()
|
||||
SET(BASHCOMP_USER_PATH "${CMAKE_INSTALL_PREFIX}/share/bash-completion/completions")
|
||||
|
||||
# Cmake doesn't allow easy use of conditional logic at INSTALL() time
|
||||
# this is a problem because ${BASHCOMP_PKG_PATH} may not be writable and we
|
||||
# need sane fallback behavior for bundled INSTALL() (e.g. .AppImage, etc).
|
||||
#
|
||||
# The reason this can't be detected by cmake is that it's fairly common to
|
||||
# run "cmake" as a one user (i.e. non-root) and "make install" as another user
|
||||
# (i.e. root).
|
||||
#
|
||||
# - Creates a script called "install_${SCRIPT_NAME}_completion.sh" into the
|
||||
# working binary directory and invokes this script at install.
|
||||
# - Script handles INSTALL()-time conditional logic for sane ballback behavior
|
||||
# when ${BASHCOMP_PKG_PATH} is unwritable (i.e. non-root); Something cmake
|
||||
# can't handle on its own at INSTALL() time)
|
||||
MACRO(BASHCOMP_INSTALL SCRIPT_NAME)
|
||||
# A shell script for wrapping conditionl logic
|
||||
SET(BASHCOMP_SCRIPT "${CMAKE_CURRENT_BINARY_DIR}/install_${SCRIPT_NAME}_completion.sh")
|
||||
|
||||
FILE(WRITE ${BASHCOMP_SCRIPT} "\
|
||||
#!${BASH}\n\
|
||||
set -e\n\
|
||||
if [ -w \"${BASHCOMP_PKG_PATH}\" ]; then\n\
|
||||
BASHCOMP_PKG_PATH=\"${BASHCOMP_PKG_PATH}\"\n\
|
||||
else \n\
|
||||
BASHCOMP_PKG_PATH=\"\$DESTDIR${BASHCOMP_USER_PATH}\"\n\
|
||||
fi\n\
|
||||
echo -e \"\\nInstalling bash completion...\\n\"\n\
|
||||
mkdir -p \"\$BASHCOMP_PKG_PATH\"\n\
|
||||
cp \"${CMAKE_CURRENT_SOURCE_DIR}/${SCRIPT_NAME}\" \"\$BASHCOMP_PKG_PATH\"\n\
|
||||
chmod a+r \"\$BASHCOMP_PKG_PATH/${SCRIPT_NAME}\"\n\
|
||||
echo -e \"Bash completion for ${SCRIPT_NAME} has been installed to \$BASHCOMP_PKG_PATH/${SCRIPT_NAME}\"\n\
|
||||
")
|
||||
INSTALL(CODE "EXECUTE_PROCESS(COMMAND chmod u+x \"install_${SCRIPT_NAME}_completion.sh\" WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} )")
|
||||
INSTALL(CODE "EXECUTE_PROCESS(COMMAND \"./install_${SCRIPT_NAME}_completion.sh\" WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} )")
|
||||
|
||||
MESSAGE(STATUS "Bash completion script for ${SCRIPT_NAME} will be installed to ${BASHCOMP_PKG_PATH} or fallback to ${BASHCOMP_USER_PATH} if unwritable.")
|
||||
ENDMACRO()
|
||||
ENDIF()
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
INCLUDE(GenQrc)
|
||||
|
||||
MACRO(BUILD_PLUGIN PLUGIN_NAME)
|
||||
CMAKE_PARSE_ARGUMENTS(PLUGIN "" "" "MOCFILES;EMBEDDED_RESOURCES;UICFILES;LINK" ${ARGN})
|
||||
CMAKE_PARSE_ARGUMENTS(PLUGIN "" "LINK;EXPORT_BASE_NAME" "MOCFILES;EMBEDDED_RESOURCES;UICFILES" ${ARGN})
|
||||
SET(PLUGIN_SOURCES ${PLUGIN_UNPARSED_ARGUMENTS})
|
||||
|
||||
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/include)
|
||||
INCLUDE_DIRECTORIES("${CMAKE_CURRENT_BINARY_DIR}" "${CMAKE_BINARY_DIR}" "${CMAKE_SOURCE_DIR}/include")
|
||||
|
||||
ADD_DEFINITIONS(-DPLUGIN_NAME=${PLUGIN_NAME})
|
||||
|
||||
@@ -22,7 +22,7 @@ MACRO(BUILD_PLUGIN PLUGIN_NAME)
|
||||
FILE(GLOB EXPANDED "${ARG}")
|
||||
LIST(SORT EXPANDED)
|
||||
FOREACH(ITEM ${EXPANDED})
|
||||
LIST(APPEND NEW_ARGS ${ITEM})
|
||||
LIST(APPEND NEW_ARGS "${ITEM}")
|
||||
ENDFOREACH()
|
||||
ENDFOREACH()
|
||||
SET(PLUGIN_EMBEDDED_RESOURCES ${NEW_ARGS})
|
||||
@@ -38,11 +38,11 @@ MACRO(BUILD_PLUGIN PLUGIN_NAME)
|
||||
ENDFOREACH(f)
|
||||
|
||||
IF(LMMS_BUILD_APPLE)
|
||||
LINK_DIRECTORIES(${CMAKE_BINARY_DIR})
|
||||
LINK_DIRECTORIES("${CMAKE_BINARY_DIR}")
|
||||
LINK_LIBRARIES(${QT_LIBRARIES})
|
||||
ENDIF(LMMS_BUILD_APPLE)
|
||||
IF(LMMS_BUILD_WIN32)
|
||||
LINK_DIRECTORIES(${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR})
|
||||
LINK_DIRECTORIES("${CMAKE_BINARY_DIR}" "${CMAKE_SOURCE_DIR}")
|
||||
LINK_LIBRARIES(${QT_LIBRARIES})
|
||||
ENDIF(LMMS_BUILD_WIN32)
|
||||
IF(LMMS_BUILD_MSYS AND CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
@@ -50,11 +50,11 @@ MACRO(BUILD_PLUGIN PLUGIN_NAME)
|
||||
SET(QT_LIBRARIES "${QT_OVERRIDE_LIBRARIES}")
|
||||
ENDIF()
|
||||
|
||||
IF ("${PLUGIN_LINK}" STREQUAL "SHARED")
|
||||
ADD_LIBRARY(${PLUGIN_NAME} SHARED ${PLUGIN_SOURCES} ${plugin_MOC_out} ${RCC_OUT})
|
||||
ELSE ()
|
||||
ADD_LIBRARY(${PLUGIN_NAME} MODULE ${PLUGIN_SOURCES} ${plugin_MOC_out} ${RCC_OUT})
|
||||
ENDIF ()
|
||||
IF (NOT PLUGIN_LINK)
|
||||
SET(PLUGIN_LINK "MODULE")
|
||||
ENDIF()
|
||||
|
||||
ADD_LIBRARY(${PLUGIN_NAME} ${PLUGIN_LINK} ${PLUGIN_SOURCES} ${plugin_MOC_out} ${RCC_OUT})
|
||||
|
||||
TARGET_LINK_LIBRARIES(${PLUGIN_NAME} Qt5::Widgets Qt5::Xml)
|
||||
|
||||
@@ -62,17 +62,40 @@ MACRO(BUILD_PLUGIN PLUGIN_NAME)
|
||||
TARGET_LINK_LIBRARIES(${PLUGIN_NAME} lmms)
|
||||
ENDIF(LMMS_BUILD_WIN32)
|
||||
|
||||
INSTALL(TARGETS ${PLUGIN_NAME} LIBRARY DESTINATION "${PLUGIN_DIR}")
|
||||
INSTALL(TARGETS ${PLUGIN_NAME}
|
||||
LIBRARY DESTINATION "${PLUGIN_DIR}"
|
||||
RUNTIME DESTINATION "${PLUGIN_DIR}"
|
||||
)
|
||||
|
||||
IF(LMMS_BUILD_APPLE)
|
||||
SET_TARGET_PROPERTIES(${PLUGIN_NAME} PROPERTIES LINK_FLAGS "-bundle_loader ${CMAKE_BINARY_DIR}/lmms")
|
||||
IF ("${PLUGIN_LINK}" STREQUAL "SHARED")
|
||||
SET_TARGET_PROPERTIES(${PLUGIN_NAME} PROPERTIES LINK_FLAGS "-undefined dynamic_lookup")
|
||||
ELSE()
|
||||
SET_TARGET_PROPERTIES(${PLUGIN_NAME} PROPERTIES LINK_FLAGS "-bundle_loader \"${CMAKE_BINARY_DIR}/lmms\"")
|
||||
ENDIF()
|
||||
ADD_DEPENDENCIES(${PLUGIN_NAME} lmms)
|
||||
ENDIF(LMMS_BUILD_APPLE)
|
||||
IF(LMMS_BUILD_WIN32 AND STRIP)
|
||||
IF(LMMS_BUILD_WIN32)
|
||||
IF(STRIP)
|
||||
ADD_CUSTOM_COMMAND(TARGET ${PLUGIN_NAME} POST_BUILD COMMAND ${STRIP} "$<TARGET_FILE:${PLUGIN_NAME}>")
|
||||
ENDIF()
|
||||
SET_TARGET_PROPERTIES(${PLUGIN_NAME} PROPERTIES PREFIX "")
|
||||
ADD_CUSTOM_COMMAND(TARGET ${PLUGIN_NAME} POST_BUILD COMMAND ${STRIP} $<TARGET_FILE:${PLUGIN_NAME}>)
|
||||
ENDIF()
|
||||
|
||||
SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${RCC_OUT} ${plugin_MOC_out}")
|
||||
|
||||
IF(NOT PLUGIN_EXPORT_BASE_NAME)
|
||||
SET(PLUGIN_EXPORT_BASE_NAME "PLUGIN")
|
||||
ENDIF()
|
||||
|
||||
GENERATE_EXPORT_HEADER(${PLUGIN_NAME}
|
||||
BASE_NAME ${PLUGIN_EXPORT_BASE_NAME}
|
||||
)
|
||||
TARGET_INCLUDE_DIRECTORIES(${PLUGIN_NAME}
|
||||
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>
|
||||
)
|
||||
|
||||
SET_PROPERTY(GLOBAL APPEND PROPERTY PLUGINS_BUILT ${PLUGIN_NAME})
|
||||
GET_PROPERTY(PLUGINS_BUILT GLOBAL PROPERTY PLUGINS_BUILT)
|
||||
ENDMACRO(BUILD_PLUGIN)
|
||||
|
||||
|
||||
33
cmake/modules/CheckCXXPreprocessor.cmake
Normal file
@@ -0,0 +1,33 @@
|
||||
|
||||
macro(CHECK_CXX_PREPROCESSOR VAR DIRECTIVE)
|
||||
string(RANDOM DEFINED_KEY)
|
||||
string(RANDOM UNDEFINED_KEY)
|
||||
|
||||
set(TMP_FILENAME "${CMAKE_CURRENT_BINARY_DIR}/CxxTmp/src.cpp")
|
||||
SET(SRC "
|
||||
#if ${DIRECTIVE}
|
||||
#error ${DEFINED_KEY}
|
||||
#else
|
||||
#error ${UNDEFINED_KEY}
|
||||
#endif
|
||||
")
|
||||
file(WRITE ${TMP_FILENAME} "${SRC}")
|
||||
try_compile(RESULT_VAR
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${TMP_FILENAME}
|
||||
OUTPUT_VARIABLE OUTPUT_VAR
|
||||
)
|
||||
|
||||
if(OUTPUT_VAR MATCHES ${DEFINED_KEY})
|
||||
set(${VAR} ON)
|
||||
elseif(OUTPUT_VAR MATCHES ${UNDEFINED_KEY})
|
||||
set(${VAR} OFF)
|
||||
else()
|
||||
message(FATAL_ERROR "Can't determine if \"${DIRECTIVE}\" is true.")
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
|
||||
macro(CHECK_CXX_DEFINE VAR DEFINE)
|
||||
CHECK_CXX_PREPROCESSOR(${VAR} "defined(${DEFINE})")
|
||||
endmacro()
|
||||
@@ -7,18 +7,20 @@
|
||||
# INCLUDE(CheckSubmodules)
|
||||
#
|
||||
# Options:
|
||||
# SET(SKIP_SUBMODULES "foo;bar")
|
||||
# SET(PLUGIN_LIST "zynaddsubfx;...") # skips submodules for plugins not explicitely listed
|
||||
#
|
||||
# Or via command line:
|
||||
# cmake -DSKIP_SUBMODULES=foo;bar
|
||||
# cmake -PLUGIN_LIST=foo;bar
|
||||
#
|
||||
# Copyright (c) 2017, Tres Finocchiaro, <tres.finocchiaro@gmail.com>
|
||||
# Copyright (c) 2019, Tres Finocchiaro, <tres.finocchiaro@gmail.com>
|
||||
#
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
||||
|
||||
# Files which confirm a successful clone
|
||||
SET(VALID_CRUMBS "CMakeLists.txt;Makefile;Makefile.in;Makefile.am;configure.ac;configure.py;autogen.sh;.gitignore")
|
||||
SET(VALID_CRUMBS "CMakeLists.txt;Makefile;Makefile.in;Makefile.am;configure.ac;configure.py;autogen.sh;.gitignore;LICENSE;Home.md")
|
||||
|
||||
OPTION(NO_SHALLOW_CLONE "Disable shallow cloning of submodules" OFF)
|
||||
|
||||
# Try and use the specified shallow clone on submodules, if supported
|
||||
SET(DEPTH_VALUE 100)
|
||||
@@ -26,7 +28,13 @@ SET(DEPTH_VALUE 100)
|
||||
# Number of times git commands will retry before failing
|
||||
SET(MAX_ATTEMPTS 2)
|
||||
|
||||
MESSAGE("\nValidating submodules...")
|
||||
MESSAGE("\nChecking submodules...")
|
||||
IF(NOT EXISTS "${CMAKE_SOURCE_DIR}/.gitmodules")
|
||||
MESSAGE("Skipping the check because .gitmodules not detected."
|
||||
"Please make sure you have all submodules in the source tree!"
|
||||
)
|
||||
RETURN()
|
||||
ENDIF()
|
||||
FILE(READ "${CMAKE_SOURCE_DIR}/.gitmodules" SUBMODULE_DATA)
|
||||
|
||||
# Force English locale
|
||||
@@ -35,74 +43,112 @@ SET(LANG_BACKUP "$ENV{LANG}")
|
||||
SET(ENV{LC_ALL} "C")
|
||||
SET(ENV{LANG} "en_US")
|
||||
|
||||
# Assume alpha-numeric paths
|
||||
STRING(REGEX MATCHALL "path = [-0-9A-Za-z/]+" SUBMODULE_LIST ${SUBMODULE_DATA})
|
||||
STRING(REGEX MATCHALL "url = [.:%-0-9A-Za-z/]+" SUBMODULE_URL_LIST ${SUBMODULE_DATA})
|
||||
# Submodule list pairs, unparsed (WARNING: Assumes alpha-numeric paths)
|
||||
STRING(REGEX MATCHALL "path = [-0-9A-Za-z/]+" SUBMODULE_LIST_RAW ${SUBMODULE_DATA})
|
||||
STRING(REGEX MATCHALL "url = [.:%-0-9A-Za-z/]+" SUBMODULE_URL_RAW ${SUBMODULE_DATA})
|
||||
|
||||
FOREACH(_part ${SUBMODULE_LIST})
|
||||
STRING(REPLACE "path = " "" SUBMODULE_PATH ${_part})
|
||||
# Submodule list pairs, parsed
|
||||
SET(SUBMODULE_LIST "")
|
||||
SET(SUBMODULE_URL "")
|
||||
|
||||
LIST(FIND SUBMODULE_LIST ${_part} SUBMODULE_INDEX)
|
||||
LIST(GET SUBMODULE_URL_LIST ${SUBMODULE_INDEX} _url)
|
||||
STRING(REPLACE "url = " "" SUBMODULE_URL ${_url})
|
||||
FOREACH(_path ${SUBMODULE_LIST_RAW})
|
||||
# Parse SUBMODULE_PATH
|
||||
STRING(REPLACE "path = " "" SUBMODULE_PATH "${_path}")
|
||||
|
||||
# Grab index for matching SUBMODULE_URL
|
||||
LIST(FIND SUBMODULE_LIST_RAW "${_path}" SUBMODULE_INDEX)
|
||||
LIST(GET SUBMODULE_URL_RAW ${SUBMODULE_INDEX} _url)
|
||||
|
||||
# Parse SUBMODULE_URL
|
||||
STRING(REPLACE "url = " "" SUBMODULE_URL "${_url}")
|
||||
|
||||
# Remove submodules from validation as specified in -DSKIP_SUBMODULES=foo;bar
|
||||
SET(SKIP false)
|
||||
|
||||
# Loop over skipped plugins, add to SKIP_SUBMODULES (e.g. -DPLUGIN_LIST=foo;bar)
|
||||
IF(${SUBMODULE_PATH} MATCHES "^plugins/")
|
||||
SET(REMOVE_PLUGIN true)
|
||||
FOREACH(_plugin ${PLUGIN_LIST})
|
||||
IF(_plugin STREQUAL "")
|
||||
CONTINUE()
|
||||
ENDIF()
|
||||
IF(${SUBMODULE_PATH} MATCHES "${_plugin}")
|
||||
SET(REMOVE_PLUGIN false)
|
||||
ENDIF()
|
||||
ENDFOREACH()
|
||||
|
||||
IF(REMOVE_PLUGIN)
|
||||
LIST(APPEND SKIP_SUBMODULES "${SUBMODULE_PATH}")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
# Finally, loop and mark "SKIP" on match
|
||||
IF(SKIP_SUBMODULES)
|
||||
FOREACH(_skip ${SKIP_SUBMODULES})
|
||||
IF(${SUBMODULE_PATH} MATCHES ${_skip})
|
||||
MESSAGE("-- Skipping ${SUBMODULE_PATH} matches \"${_skip}\"")
|
||||
IF("${SUBMODULE_PATH}" MATCHES "${_skip}")
|
||||
MESSAGE("-- Skipping ${SUBMODULE_PATH} matches \"${_skip}\" (absent in PLUGIN_LIST)")
|
||||
SET(SKIP true)
|
||||
BREAK()
|
||||
ENDIF()
|
||||
ENDFOREACH()
|
||||
ENDIF()
|
||||
IF(NOT SKIP)
|
||||
LIST(INSERT SUBMODULE_LIST ${SUBMODULE_INDEX} ${SUBMODULE_PATH})
|
||||
LIST(INSERT SUBMODULE_URL_LIST ${SUBMODULE_INDEX} ${SUBMODULE_URL})
|
||||
ENDIF()
|
||||
LIST(REMOVE_ITEM SUBMODULE_LIST ${_part})
|
||||
LIST(REMOVE_ITEM SUBMODULE_URL_LIST ${_url})
|
||||
ENDFOREACH()
|
||||
|
||||
IF(NOT SKIP)
|
||||
LIST(APPEND SUBMODULE_LIST "${SUBMODULE_PATH}")
|
||||
LIST(APPEND SUBMODULE_URL "${SUBMODULE_URL}")
|
||||
ENDIF()
|
||||
ENDFOREACH()
|
||||
|
||||
# Once called, status is stored in GIT_RESULT respectively.
|
||||
# Note: Git likes to write to stderr. Don't assume stderr is error; Check GIT_RESULT instead.
|
||||
MACRO(GIT_SUBMODULE SUBMODULE_PATH FORCE_DEINIT FORCE_REMOTE)
|
||||
MACRO(GIT_SUBMODULE SUBMODULE_PATH FORCE_DEINIT FORCE_REMOTE FULL_CLONE)
|
||||
FIND_PACKAGE(Git REQUIRED)
|
||||
# Handle missing commits
|
||||
SET(FORCE_REMOTE_FLAG "${FORCE_REMOTE}")
|
||||
SET(FULL_CLONE_FLAG "${FULL_CLONE}")
|
||||
IF(FORCE_REMOTE_FLAG)
|
||||
MESSAGE("-- Adding remote submodulefix to ${SUBMODULE_PATH}")
|
||||
EXECUTE_PROCESS(
|
||||
COMMAND ${GIT_EXECUTABLE} remote rm submodulefix
|
||||
COMMAND ${GIT_EXECUTABLE} remote add submodulefix ${FORCE_REMOTE}
|
||||
COMMAND ${GIT_EXECUTABLE} fetch submodulefix
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/${SUBMODULE_PATH}
|
||||
COMMAND "${GIT_EXECUTABLE}" remote rm submodulefix
|
||||
COMMAND "${GIT_EXECUTABLE}" remote add submodulefix ${FORCE_REMOTE}
|
||||
COMMAND "${GIT_EXECUTABLE}" fetch submodulefix
|
||||
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/${SUBMODULE_PATH}"
|
||||
OUTPUT_QUIET ERROR_QUIET
|
||||
)
|
||||
# Recurse
|
||||
GIT_SUBMODULE(${SUBMODULE_PATH} false false)
|
||||
GIT_SUBMODULE(${SUBMODULE_PATH} false false ${FULL_CLONE_FLAG})
|
||||
ELSEIF(${FORCE_DEINIT})
|
||||
MESSAGE("-- Resetting ${SUBMODULE_PATH}")
|
||||
EXECUTE_PROCESS(
|
||||
COMMAND ${GIT_EXECUTABLE} submodule deinit -f ${CMAKE_SOURCE_DIR}/${SUBMODULE_PATH}
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
COMMAND "${GIT_EXECUTABLE}" submodule deinit -f "${CMAKE_SOURCE_DIR}/${SUBMODULE_PATH}"
|
||||
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
|
||||
OUTPUT_QUIET
|
||||
)
|
||||
MESSAGE("-- Deleting ${CMAKE_SOURCE_DIR}/.git/${SUBMODULE_PATH}")
|
||||
FILE(REMOVE_RECURSE "${CMAKE_SOURCE_DIR}/.git/modules/${SUBMODULE_PATH}")
|
||||
# Recurse
|
||||
GIT_SUBMODULE(${SUBMODULE_PATH} false false)
|
||||
GIT_SUBMODULE(${SUBMODULE_PATH} false false true)
|
||||
ELSE()
|
||||
# Try to use the depth switch
|
||||
SET(DEPTH_CMD "")
|
||||
IF(NO_SHALLOW_CLONE OR GIT_VERSION_STRING VERSION_LESS "1.8.4")
|
||||
# Shallow submodules were introduced in 1.8.4
|
||||
MESSAGE("-- Fetching ${SUBMODULE_PATH}")
|
||||
IF(DEPTH_VALUE)
|
||||
SET(DEPTH_CMD "--depth" )
|
||||
SET(DEPTH_CMD "")
|
||||
SET(DEPTH_VAL "")
|
||||
ELSEIF(FULL_CLONE_FLAG)
|
||||
# Depth doesn't revert easily... It should be "--no-recommend-shallow"
|
||||
# but it's ignored by nested submodules, use the highest value instead.
|
||||
MESSAGE("-- Fetching ${SUBMODULE_PATH}")
|
||||
SET(DEPTH_CMD "--depth")
|
||||
SET(DEPTH_VAL "2147483647")
|
||||
ELSE()
|
||||
MESSAGE("-- Fetching ${SUBMODULE_PATH} @ --depth ${DEPTH_VALUE}")
|
||||
SET(DEPTH_CMD "--depth")
|
||||
SET(DEPTH_VAL "${DEPTH_VALUE}")
|
||||
ENDIF()
|
||||
|
||||
EXECUTE_PROCESS(
|
||||
COMMAND ${GIT_EXECUTABLE} submodule update --init --recursive ${DEPTH_CMD} ${DEPTH_VALUE} ${CMAKE_SOURCE_DIR}/${SUBMODULE_PATH}
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
COMMAND "${GIT_EXECUTABLE}" submodule update --init --recursive ${DEPTH_CMD} ${DEPTH_VAL} "${CMAKE_SOURCE_DIR}/${SUBMODULE_PATH}"
|
||||
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
|
||||
RESULT_VARIABLE GIT_RESULT
|
||||
OUTPUT_VARIABLE GIT_STDOUT
|
||||
ERROR_VARIABLE GIT_STDERR
|
||||
@@ -118,7 +164,7 @@ SET(RETRY_PHRASES "Failed to recurse;cannot create directory;already exists;${MI
|
||||
|
||||
# Attempt to do lazy clone
|
||||
FOREACH(_submodule ${SUBMODULE_LIST})
|
||||
STRING(REPLACE "/" ";" PATH_PARTS ${_submodule})
|
||||
STRING(REPLACE "/" ";" PATH_PARTS "${_submodule}")
|
||||
LIST(REVERSE PATH_PARTS)
|
||||
LIST(GET PATH_PARTS 0 SUBMODULE_NAME)
|
||||
|
||||
@@ -132,14 +178,12 @@ FOREACH(_submodule ${SUBMODULE_LIST})
|
||||
ENDIF()
|
||||
ENDFOREACH()
|
||||
IF(NOT CRUMB_FOUND)
|
||||
GIT_SUBMODULE(${_submodule} false false)
|
||||
GIT_SUBMODULE("${_submodule}" false false false)
|
||||
|
||||
SET(COUNTED 0)
|
||||
SET(COUNTING "")
|
||||
# Handle edge-cases where submodule didn't clone properly or re-uses a non-empty directory
|
||||
WHILE(NOT GIT_RESULT EQUAL 0 AND COUNTED LESS MAX_ATTEMPTS)
|
||||
LIST(APPEND COUNTING "x")
|
||||
LIST(LENGTH COUNTING COUNTED)
|
||||
MATH(EXPR COUNTED "${COUNTED}+1")
|
||||
SET(MISSING_COMMIT false)
|
||||
FOREACH(_phrase ${MISSING_COMMIT_PHRASES})
|
||||
IF("${GIT_MESSAGE}" MATCHES "${_phrase}")
|
||||
@@ -148,25 +192,22 @@ FOREACH(_submodule ${SUBMODULE_LIST})
|
||||
ENDIF()
|
||||
ENDFOREACH()
|
||||
FOREACH(_phrase ${RETRY_PHRASES})
|
||||
IF(${MISSING_COMMIT})
|
||||
IF(${MISSING_COMMIT} AND COUNTED LESS 2)
|
||||
LIST(FIND SUBMODULE_LIST ${_submodule} SUBMODULE_INDEX)
|
||||
LIST(GET SUBMODULE_URL_LIST ${SUBMODULE_INDEX} SUBMODULE_URL)
|
||||
MESSAGE("-- Retrying ${_submodule} using 'remote add submodulefix' (attempt ${COUNTED} of ${MAX_ATTEMPTS})...")
|
||||
|
||||
GIT_SUBMODULE(${_submodule} false "${SUBMODULE_URL}")
|
||||
GIT_SUBMODULE("${_submodule}" false "${SUBMODULE_URL}" false)
|
||||
BREAK()
|
||||
ELSEIF("${GIT_MESSAGE}" MATCHES "${_phrase}")
|
||||
MESSAGE("-- Retrying ${_submodule} using 'deinit' (attempt ${COUNTED} of ${MAX_ATTEMPTS})...")
|
||||
|
||||
# Shallow submodules were introduced in 1.8.4
|
||||
# Shallow commits can fail to clone from non-default branches, only try once
|
||||
IF(GIT_VERSION_STRING VERSION_GREATER "1.8.3" AND COUNTED LESS 2)
|
||||
# Try a shallow submodule clone
|
||||
IF(COUNTED LESS 2)
|
||||
SET(FULL_CLONE false)
|
||||
ELSE()
|
||||
UNSET(DEPTH_VALUE)
|
||||
SET(FULL_CLONE true)
|
||||
ENDIF()
|
||||
|
||||
GIT_SUBMODULE(${_submodule} true false)
|
||||
GIT_SUBMODULE("${_submodule}" true false ${FULL_CLONE})
|
||||
BREAK()
|
||||
ENDIF()
|
||||
ENDFOREACH()
|
||||
|
||||
27
cmake/modules/CheckWineGcc.cmake
Normal file
@@ -0,0 +1,27 @@
|
||||
INCLUDE(CheckCXXSourceCompiles)
|
||||
|
||||
FUNCTION(CheckWineGcc BITNESS WINEGCC_EXECUTABLE RESULT)
|
||||
FILE(WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/winegcc_test.cxx" "
|
||||
#include <iostream>
|
||||
#define USE_WS_PREFIX
|
||||
#include <windows.h>
|
||||
int main(int argc, const char* argv[]) {
|
||||
return 0;
|
||||
}
|
||||
")
|
||||
EXECUTE_PROCESS(COMMAND ${WINEGCC_EXECUTABLE} "-m${BITNESS}"
|
||||
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/winegcc_test.cxx"
|
||||
"-o" "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/winegcc_test"
|
||||
OUTPUT_QUIET ERROR_QUIET
|
||||
RESULT_VARIABLE WINEGCC_RESULT
|
||||
)
|
||||
FILE(REMOVE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/winegcc_test.cxx"
|
||||
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/winegcc_test"
|
||||
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/winegcc_test.exe.so"
|
||||
)
|
||||
IF(WINEGCC_RESULT EQUAL 0)
|
||||
SET(${RESULT} True PARENT_SCOPE)
|
||||
ELSE()
|
||||
SET(${RESULT} False PARENT_SCOPE)
|
||||
ENDIF()
|
||||
ENDFUNCTION()
|
||||
25
cmake/modules/CompileCache.cmake
Normal file
@@ -0,0 +1,25 @@
|
||||
option(USE_COMPILE_CACHE "Use ccache or clcache for compilation" OFF)
|
||||
|
||||
# Compatibility for old option name
|
||||
if(USE_CCACHE)
|
||||
set(USE_COMPILE_CACHE ON)
|
||||
endif()
|
||||
|
||||
if(USE_COMPILE_CACHE)
|
||||
if(MSVC)
|
||||
set(CACHE_TOOL_NAME clcache)
|
||||
elseif(CMAKE_CXX_COMPILER_ID MATCHES "(GNU|AppleClang|Clang)")
|
||||
set(CACHE_TOOL_NAME ccache)
|
||||
else()
|
||||
message(WARNING "Compile cache only available with MSVC or GNU")
|
||||
endif()
|
||||
|
||||
find_program(CACHE_TOOL ${CACHE_TOOL_NAME})
|
||||
if (CACHE_TOOL)
|
||||
message(STATUS "Using ${CACHE_TOOL} found for caching")
|
||||
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ${CACHE_TOOL})
|
||||
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ${CACHE_TOOL})
|
||||
else()
|
||||
message(WARNING "USE_COMPILE_CACHE enabled, but no ${CACHE_TOOL_NAME} found")
|
||||
endif()
|
||||
endif()
|
||||
21
cmake/modules/CreateTempFile.cmake
Normal file
@@ -0,0 +1,21 @@
|
||||
function(CreateTempFilePath)
|
||||
set(options CONFIG_SUFFIX)
|
||||
set(oneValueArgs OUTPUT_VAR TAG)
|
||||
set(multiValueArgs CONTENT)
|
||||
cmake_parse_arguments(TEMP "${options}" "${oneValueArgs}"
|
||||
"${multiValueArgs}" ${ARGN} )
|
||||
|
||||
# Use hash to create a unique identifier
|
||||
# for this file.
|
||||
string(SHA1 hashed_content "${TEMP_CONTENT}")
|
||||
|
||||
set(file_name "${CMAKE_BINARY_DIR}/${TEMP_TAG}_${hashed_content}")
|
||||
set(${TEMP_OUTPUT_VAR} "${file_name}" PARENT_SCOPE)
|
||||
if(CONFIG_SUFFIX)
|
||||
set(file_name "${file_name}_$<CONFIG>")
|
||||
endif()
|
||||
|
||||
file(GENERATE OUTPUT "${file_name}"
|
||||
CONTENT "${TEMP_CONTENT}")
|
||||
|
||||
endfunction()
|
||||
31
cmake/modules/DefineInstallVar.cmake
Normal file
@@ -0,0 +1,31 @@
|
||||
# This functions forwards a variable to
|
||||
# the install stage.
|
||||
# Parameters:
|
||||
# CONTENT: Variable content.
|
||||
# NAME: Variable name.
|
||||
# Options:
|
||||
# GENERATOR_EXPRESSION: Support generator expression for CONTENT.
|
||||
function(DEFINE_INSTALL_VAR)
|
||||
set(options GENERATOR_EXPRESSION)
|
||||
set(oneValueArgs NAME )
|
||||
set(multiValueArgs CONTENT)
|
||||
cmake_parse_arguments(VAR "${options}" "${oneValueArgs}"
|
||||
"${multiValueArgs}" ${ARGN} )
|
||||
|
||||
# install(CODE) does not support generator expression in ver<3.14
|
||||
if(VAR_GENERATOR_EXPRESSION AND ${CMAKE_VERSION} VERSION_LESS "3.14.0")
|
||||
include(CreateTempFile)
|
||||
if(CMAKE_CONFIGURATION_TYPES) # in case of multi-config generators like MSVC generators
|
||||
CreateTempFilePath(OUTPUT_VAR file_path TAG "${VAR_NAME}" CONTENT "${VAR_CONTENT}" CONFIG_SUFFIX)
|
||||
install(CODE "file(READ \"${file_path}_\${CMAKE_INSTALL_CONFIG_NAME}\" \"${VAR_NAME}\")")
|
||||
else()
|
||||
CreateTempFilePath(OUTPUT_VAR file_path TAG "${VAR_NAME}" CONTENT "${VAR_CONTENT}")
|
||||
install(CODE "file(READ \"${file_path}\" \"${VAR_NAME}\")")
|
||||
endif()
|
||||
else()
|
||||
if(VAR_GENERATOR_EXPRESSION)
|
||||
cmake_policy(SET CMP0087 NEW)
|
||||
endif()
|
||||
install(CODE "set(\"${VAR_NAME}\" \"${VAR_CONTENT}\")")
|
||||
endif()
|
||||
endfunction()
|
||||
@@ -4,20 +4,25 @@ ELSEIF(APPLE)
|
||||
SET(LMMS_BUILD_APPLE 1)
|
||||
ELSEIF(${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD")
|
||||
SET(LMMS_BUILD_OPENBSD 1)
|
||||
ELSEIF(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
|
||||
SET(LMMS_BUILD_FREEBSD 1)
|
||||
ELSEIF(HAIKU)
|
||||
SET(LMMS_BUILD_HAIKU 1)
|
||||
ELSE()
|
||||
SET(LMMS_BUILD_LINUX 1)
|
||||
ENDIF(WIN32)
|
||||
|
||||
# See build_winXX.sh for LMMS_BUILD_MSYS
|
||||
# LMMS_BUILD_MSYS also set in build_winXX.sh
|
||||
IF(LMMS_BUILD_WIN32 AND CMAKE_COMPILER_IS_GNUCXX AND DEFINED ENV{MSYSCON})
|
||||
SET(LMMS_BUILD_MSYS TRUE)
|
||||
ENDIF()
|
||||
|
||||
MESSAGE("PROCESSOR: ${CMAKE_SYSTEM_PROCESSOR}")
|
||||
SET(LMMS_HOST_X86 FALSE)
|
||||
SET(LMMS_HOST_X86_64 FALSE)
|
||||
|
||||
IF(MSVC)
|
||||
STRING(REGEX MATCH "86_64|amd64|AMD64" WIN64 "${CMAKE_SYSTEM_PROCESSOR}")
|
||||
IF(NOT DEFINED WIN64 AND CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
SET(WIN64 ON)
|
||||
ENDIF()
|
||||
|
||||
IF(WIN32)
|
||||
@@ -27,6 +32,25 @@ IF(WIN32)
|
||||
ELSE(WIN64)
|
||||
SET(IS_X86 TRUE)
|
||||
ENDIF(WIN64)
|
||||
|
||||
if(MSVC)
|
||||
SET(MSVC_VER ${CMAKE_CXX_COMPILER_VERSION})
|
||||
|
||||
IF(MSVC_VER VERSION_GREATER 19.20 OR MSVC_VER VERSION_EQUAL 19.20)
|
||||
SET(LMMS_MSVC_GENERATOR "Visual Studio 16 2019")
|
||||
SET(LMMS_MSVC_YEAR 2019) # Qt only provides binaries for MSVC 2017, but 2019 is binary compatible
|
||||
ELSEIF(MSVC_VER VERSION_GREATER 19.10 OR MSVC_VER VERSION_EQUAL 19.10)
|
||||
SET(LMMS_MSVC_GENERATOR "Visual Studio 15 2017")
|
||||
SET(LMMS_MSVC_YEAR 2017)
|
||||
ELSEIF(MSVC_VER VERSION_GREATER 19.0 OR MSVC_VER VERSION_EQUAL 19.0)
|
||||
SET(LMMS_MSVC_GENERATOR "Visual Studio 14 2015")
|
||||
SET(LMMS_MSVC_YEAR 2015)
|
||||
ELSE()
|
||||
MESSAGE(SEND_WARNING "Can't detect MSVC version: ${MSVC_VER}")
|
||||
ENDIF()
|
||||
|
||||
unset(MSVC_VER)
|
||||
endif()
|
||||
ELSE(WIN32)
|
||||
EXEC_PROGRAM( ${CMAKE_C_COMPILER} ARGS "-dumpmachine ${CMAKE_C_FLAGS}" OUTPUT_VARIABLE Machine )
|
||||
MESSAGE("Machine: ${Machine}")
|
||||
|
||||
47
cmake/modules/FindFFTW.cmake
Normal file
@@ -0,0 +1,47 @@
|
||||
# FindFFTW.cmake - Try to find FFTW3
|
||||
# Copyright (c) 2018 Lukas W <lukaswhl/at/gmail.com>
|
||||
# This file is MIT licensed.
|
||||
# See http://opensource.org/licenses/MIT
|
||||
|
||||
# Try pkgconfig for hints
|
||||
find_package(PkgConfig QUIET)
|
||||
|
||||
if(NOT FFTW_FIND_COMPONENTS)
|
||||
set(FFTW_FIND_COMPONENTS fftw3f fftw3 fftwl)
|
||||
endif()
|
||||
|
||||
if(PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(FFTW_PKG QUIET fftw>=3.0.0)
|
||||
pkg_check_modules(FFTW3_PKG QUIET fftw3>=3.0.0)
|
||||
endif()
|
||||
|
||||
find_path(FFTW_INCLUDE_DIR
|
||||
NAMES fftw3.h
|
||||
PATHS ${FFTW_PKG_INCLUDE_DIRS} ${FFTW3_PKG_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
set(check_list)
|
||||
|
||||
foreach(comp ${FFTW_FIND_COMPONENTS})
|
||||
string(TOUPPER ${comp} COMP)
|
||||
if(PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(${COMP}_PKG QUIET ${comp}>=3.0.0)
|
||||
endif()
|
||||
|
||||
find_library(${COMP}_LIBRARY
|
||||
NAMES ${comp}
|
||||
PATHS ${comp}_PKG_LIBRARY_DIRS
|
||||
)
|
||||
list(APPEND check_list ${COMP}_LIBRARY)
|
||||
|
||||
set(${COMP}_LIBRARIES ${${COMP}_LIBRARY} CACHE FILEPATH "${COMP} library path")
|
||||
set(${COMP}_INCLUDE_DIRS ${FFTW_INCLUDE_DIR} CACHE PATH "${COMP} include path")
|
||||
mark_as_advanced(${COMP}_LIBRARIES ${COMP}_INCLUDE_DIRS)
|
||||
endforeach()
|
||||
|
||||
find_package(PackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(FFTW DEFAULT_MSG FFTW_INCLUDE_DIR ${check_list})
|
||||
|
||||
set(FFTW_INCLUDE_DIRS ${FFTW_INCLUDE_DIR})
|
||||
|
||||
mark_as_advanced(FFTW_LIBRARY FFTW_LIBRARIES FFTW_INCLUDE_DIR FFTW_INCLUDE_DIRS ${check_list})
|
||||
34
cmake/modules/FindSamplerate.cmake
Normal file
@@ -0,0 +1,34 @@
|
||||
# FindFFTW.cmake - Try to find FFTW3
|
||||
# Copyright (c) 2018 Lukas W <lukaswhl/at/gmail.com>
|
||||
# This file is MIT licensed.
|
||||
# See http://opensource.org/licenses/MIT
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
if(PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(SAMPLERATE_PKG samplerate)
|
||||
endif()
|
||||
|
||||
find_path(SAMPLERATE_INCLUDE_DIR
|
||||
NAMES samplerate.h
|
||||
PATHS ${SAMPLERATE_PKG_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
set(SAMPLERATE_NAMES samplerate libsamplerate)
|
||||
if(Samplerate_FIND_VERSION_MAJOR)
|
||||
list(APPEND SAMPLERATE_NAMES libsamplerate-${Samplerate_FIND_VERSION_MAJOR})
|
||||
else()
|
||||
list(APPEND SAMPLERATE_NAMES libsamplerate-0)
|
||||
endif()
|
||||
|
||||
find_library(SAMPLERATE_LIBRARY
|
||||
NAMES ${SAMPLERATE_NAMES}
|
||||
PATHS ${SAMPLERATE_PKG_LIBRARY_DIRS}
|
||||
)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(SAMPLERATE DEFAULT_MSG SAMPLERATE_LIBRARY SAMPLERATE_INCLUDE_DIR)
|
||||
|
||||
mark_as_advanced(SAMPLERATE_INCLUDE_DIR SAMPLERATE_LIBRARY )
|
||||
|
||||
set(SAMPLERATE_LIBRARIES ${SAMPLERATE_LIBRARY} )
|
||||
set(SAMPLERATE_INCLUDE_DIRS ${SAMPLERATE_INCLUDE_DIR})
|
||||
39
cmake/modules/FindSndFile.cmake
Normal file
@@ -0,0 +1,39 @@
|
||||
# FindSndFile.cmake - Try to find libsndfile
|
||||
# Copyright (c) 2018 Lukas W <lukaswhl/at/gmail.com>
|
||||
# This file is MIT licensed.
|
||||
# See http://opensource.org/licenses/MIT
|
||||
|
||||
# Try pkgconfig for hints
|
||||
find_package(PkgConfig QUIET)
|
||||
if(PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(SNDFILE_PKG sndfile)
|
||||
endif(PKG_CONFIG_FOUND)
|
||||
set(SndFile_DEFINITIONS ${SNDFILE_PKG_CFLAGS_OTHER})
|
||||
|
||||
if(WIN32)
|
||||
# Try Vcpkg
|
||||
find_package(LibSndFile ${SndFile_FIND_VERSION} CONFIG QUIET)
|
||||
if(LibSndFile_FOUND)
|
||||
get_target_property(LibSndFile_Location sndfile-shared LOCATION)
|
||||
get_target_property(LibSndFile_Include_Path sndfile-shared INTERFACE_INCLUDE_DIRECTORIES)
|
||||
get_filename_component(LibSndFile_Path LibSndFile_Location PATH)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
find_path(SNDFILE_INCLUDE_DIR
|
||||
NAMES sndfile.h
|
||||
PATHS ${SNDFILE_PKG_INCLUDE_DIRS} ${LibSndFile_Include_Path}
|
||||
)
|
||||
|
||||
find_library(SNDFILE_LIBRARY
|
||||
NAMES sndfile libsndfile libsndfile-1
|
||||
PATHS ${SNDFILE_PKG_LIBRARY_DIRS} ${LibSndFile_Path}
|
||||
)
|
||||
|
||||
find_package(PackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(SndFile DEFAULT_MSG SNDFILE_LIBRARY SNDFILE_INCLUDE_DIR)
|
||||
|
||||
set(SNDFILE_LIBRARIES ${SNDFILE_LIBRARY})
|
||||
set(SNDFILE_INCLUDE_DIRS ${SNDFILE_INCLUDE_DIR})
|
||||
|
||||
mark_as_advanced(SNDFILE_LIBRARY SNDFILE_LIBRARIES SNDFILE_INCLUDE_DIR SNDFILE_INCLUDE_DIRS)
|
||||
@@ -19,14 +19,16 @@ if(SNDIO_LIBRARY)
|
||||
get_filename_component(SNDIO_LIBRARY_DIR ${SNDIO_LIBRARY} PATH)
|
||||
endif(SNDIO_LIBRARY)
|
||||
|
||||
check_library_exists(sndio sio_open "${SNDIO_LIBRARY_DIR}" HAVE_SNDIO)
|
||||
if(HAVE_SNDIO)
|
||||
message(STATUS "Found sndio: ${SNDIO_LIBRARY}")
|
||||
else(HAVE_SNDIO)
|
||||
message(STATUS "sndio not found")
|
||||
endif(HAVE_SNDIO)
|
||||
set(SNDIO_FOUND ${HAVE_SNDIO})
|
||||
check_library_exists(sndio sio_open "${SNDIO_LIBRARY_DIR}" HAVE_SIO_OPEN)
|
||||
|
||||
find_path(SNDIO_INCLUDES sndio.h)
|
||||
find_path(SNDIO_INCLUDE_DIR sndio.h)
|
||||
|
||||
mark_as_advanced(SNDIO_INCLUDES SNDIO_LIBRARY)
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(SNDIO DEFAULT_MSG SNDIO_LIBRARY SNDIO_INCLUDE_DIR HAVE_SIO_OPEN)
|
||||
|
||||
if(SNDIO_FOUND)
|
||||
set(SNDIO_INCLUDE_DIRS "${SNDIO_INCLUDE_DIR}")
|
||||
set(SNDIO_LIBRARIES "${SNDIO_LIBRARY}")
|
||||
endif()
|
||||
|
||||
mark_as_advanced(SNDIO_INCLUDE_DIR SNDIO_LIBRARY SNDIO_INCLUDE_DIRS SNDIO_LIBRARIES)
|
||||
|
||||
@@ -7,38 +7,115 @@
|
||||
# WINE_DEFINITIONS - Compiler switches required for using wine
|
||||
#
|
||||
|
||||
MACRO(_findwine_find_flags output expression result)
|
||||
STRING(REPLACE " " ";" WINEBUILD_FLAGS "${output}")
|
||||
FOREACH(FLAG ${WINEBUILD_FLAGS})
|
||||
IF("${FLAG}" MATCHES "${expression}")
|
||||
SET(${result} "${FLAG}")
|
||||
ENDIF()
|
||||
ENDFOREACH()
|
||||
ENDMACRO()
|
||||
|
||||
LIST(APPEND CMAKE_PREFIX_PATH /opt/wine-stable /opt/wine-devel /opt/wine-staging /usr/lib/wine/)
|
||||
|
||||
FIND_PATH(WINE_INCLUDE_DIR windows/windows.h PATH_SUFFIXES wine wine/wine)
|
||||
FIND_LIBRARY(WINE_LIBRARY NAMES wine PATH_SUFFIXES wine i386-linux-gnu/wine)
|
||||
FIND_PROGRAM(WINE_CXX
|
||||
NAMES wineg++ winegcc winegcc64 winegcc32 winegcc-stable
|
||||
PATHS /usr/lib/wine)
|
||||
PATHS /usr/lib/wine
|
||||
)
|
||||
FIND_PROGRAM(WINE_BUILD NAMES winebuild)
|
||||
# Detect wine paths and handle linking problems
|
||||
IF(WINE_CXX)
|
||||
EXEC_PROGRAM(${WINE_CXX} ARGS "-m32 -v /dev/zero" OUTPUT_VARIABLE WINEBUILD_OUTPUT_32)
|
||||
EXEC_PROGRAM(${WINE_CXX} ARGS "-m64 -v /dev/zero" OUTPUT_VARIABLE WINEBUILD_OUTPUT_64)
|
||||
_findwine_find_flags("${WINEBUILD_OUTPUT_32}" "^-isystem/usr/include$" BUGGED_WINEGCC)
|
||||
_findwine_find_flags("${WINEBUILD_OUTPUT_32}" "^-isystem" WINEGCC_INCLUDE_DIR)
|
||||
_findwine_find_flags("${WINEBUILD_OUTPUT_32}" "libwinecrt0\\.a.*" WINECRT_32)
|
||||
_findwine_find_flags("${WINEBUILD_OUTPUT_64}" "libwinecrt0\\.a.*" WINECRT_64)
|
||||
STRING(REGEX REPLACE "^-isystem" "" WINE_INCLUDE_HINT "${WINEGCC_INCLUDE_DIR}")
|
||||
STRING(REGEX REPLACE "/wine/windows$" "" WINE_INCLUDE_HINT "${WINE_INCLUDE_HINT}")
|
||||
STRING(REGEX REPLACE "libwinecrt0\\.a.*" "" WINE_32_LIBRARY_DIR "${WINECRT_32}")
|
||||
STRING(REGEX REPLACE "libwinecrt0\\.a.*" "" WINE_64_LIBRARY_DIR "${WINECRT_64}")
|
||||
|
||||
IF(BUGGED_WINEGCC)
|
||||
MESSAGE(WARNING "Your winegcc is unusable due to https://bugs.winehq.org/show_bug.cgi?id=46293,\n
|
||||
Consider either upgrading or downgrading wine.")
|
||||
RETURN()
|
||||
ENDIF()
|
||||
IF(WINE_32_LIBRARY_DIR STREQUAL WINE_64_LIBRARY_DIR)
|
||||
MESSAGE(STATUS "Old winegcc detected, trying to use workaround linking")
|
||||
# Fix library search directory according to the target bitness
|
||||
IF(WINE_32_LIBRARY_DIR MATCHES "/lib/(x86_64|i386)-")
|
||||
# Debian systems
|
||||
STRING(REPLACE "/lib/x86_64-" "/lib/i386-" WINE_32_LIBRARY_DIR "${WINE_32_LIBRARY_DIR}")
|
||||
STRING(REPLACE "/lib/i386-" "/lib/x86_64-" WINE_64_LIBRARY_DIR "${WINE_64_LIBRARY_DIR}")
|
||||
ELSEIF(WINE_32_LIBRARY_DIR MATCHES "/(lib|lib64)/wine/$")
|
||||
# WineHQ (/opt/wine-stable, /opt/wine-devel, /opt/wine-staging)
|
||||
STRING(REGEX REPLACE "/lib64/wine/$" "/lib/wine/" WINE_32_LIBRARY_DIR "${WINE_32_LIBRARY_DIR}")
|
||||
STRING(REGEX REPLACE "/lib/wine/$" "/lib64/wine/" WINE_64_LIBRARY_DIR "${WINE_64_LIBRARY_DIR}")
|
||||
ELSEIF(WINE_32_LIBRARY_DIR MATCHES "/lib32/.*/wine/")
|
||||
# Systems with old multilib layout
|
||||
STRING(REPLACE "/lib32/" "/lib/" WINE_64_LIBRARY_DIR "${WINE_32_LIBRARY_DIR}")
|
||||
ELSEIF(WINE_32_LIBRARY_DIR MATCHES "/lib64/.*/wine/")
|
||||
# We need to test if the corresponding 64bit library directory is lib or lib32
|
||||
STRING(REPLACE "/lib64/" "/lib32/" WINE_32_LIBRARY_DIR "${WINE_64_LIBRARY_DIR}")
|
||||
IF(NOT EXISTS "${WINE_32_LIBRARY_DIR}")
|
||||
STRING(REPLACE "/lib64/" "/lib/" WINE_32_LIBRARY_DIR "${WINE_64_LIBRARY_DIR}")
|
||||
ENDIF()
|
||||
ELSEIF(WINE_32_LIBRARY_DIR MATCHES "/lib/.*/wine/")
|
||||
# Test if this directory is for 32bit or 64bit
|
||||
STRING(REPLACE "/lib/" "/lib32/" WINE_32_LIBRARY_DIR "${WINE_64_LIBRARY_DIR}")
|
||||
IF(NOT EXISTS "${WINE_32_LIBRARY_DIR}")
|
||||
SET(WINE_32_LIBRARY_DIR "${WINE_64_LIBRARY_DIR}")
|
||||
STRING(REPLACE "/lib/" "/lib64/" WINE_64_LIBRARY_DIR "${WINE_64_LIBRARY_DIR}")
|
||||
ENDIF()
|
||||
ELSE()
|
||||
MESSAGE(WARNING "Can't detect wine installation layout. You may get some build errors.")
|
||||
ENDIF()
|
||||
SET(WINE_LIBRARY_FIX "${WINE_32_LIBRARY_DIR} and ${WINE_64_LIBRARY_DIR}")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
FIND_PATH(WINE_INCLUDE_DIR wine/exception.h
|
||||
HINTS "${WINE_INCLUDE_HINT}"
|
||||
)
|
||||
|
||||
SET(_ARCHITECTURE ${CMAKE_LIBRARY_ARCHITECTURE})
|
||||
|
||||
FIND_LIBRARY(WINE_LIBRARY NAMES wine
|
||||
PATH_SUFFIXES wine i386-linux-gnu/wine
|
||||
HINTS "${WINE_32_LIBRARY_DIR}" "${WINE_64_LIBRARY_DIR}"
|
||||
)
|
||||
|
||||
SET(CMAKE_LIBRARY_ARCHITECTURE ${_ARCHITECTURE})
|
||||
|
||||
SET(WINE_INCLUDE_DIRS ${WINE_INCLUDE_DIR} )
|
||||
SET(WINE_LIBRARIES ${WINE_LIBRARY} )
|
||||
|
||||
# Handle wine linking problems
|
||||
EXEC_PROGRAM(${WINE_CXX} ARGS "-v -m32 /dev/zero" OUTPUT_VARIABLE WINEBUILD_OUTPUT)
|
||||
STRING(REPLACE " " ";" WINEBUILD_FLAGS "${WINEBUILD_OUTPUT}")
|
||||
|
||||
FOREACH(FLAG ${WINEBUILD_FLAGS})
|
||||
IF("${FLAG}" MATCHES "libwinecrt0.a.*")
|
||||
# Debian systems
|
||||
STRING(REPLACE "/lib/x86_64-" "/lib/i386-" FLAG "${FLAG}")
|
||||
# Fedora systems
|
||||
STRING(REPLACE "/lib/lib64" "/lib/i386" FLAG "${FLAG}")
|
||||
# Gentoo systems
|
||||
STRING(REPLACE "/lib/wine-" "/lib32/wine-" FLAG "${FLAG}")
|
||||
# WineHQ (/opt/wine-stable, /opt/wine-devel, /opt/wine-staging)
|
||||
STRING(REPLACE "/lib64/wine/" "/lib/wine/" FLAG "${FLAG}")
|
||||
|
||||
STRING(REGEX REPLACE "/wine/libwinecrt0.a.*" "" WINE_LIBRARY_FIX "${FLAG}")
|
||||
SET(WINE_LIBRARY_FIX "${WINE_LIBRARY_FIX}/")
|
||||
ENDIF()
|
||||
ENDFOREACH()
|
||||
SET(WINE_LIBRARIES ${WINE_LIBRARY})
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Wine DEFAULT_MSG WINE_CXX WINE_LIBRARIES WINE_INCLUDE_DIRS)
|
||||
|
||||
mark_as_advanced(WINE_INCLUDE_DIR WINE_LIBRARY)
|
||||
mark_as_advanced(WINE_INCLUDE_DIR WINE_LIBRARY WINE_CXX WINE_BUILD)
|
||||
|
||||
IF(WINE_32_LIBRARY_DIR)
|
||||
IF(WINE_32_LIBRARY_DIR MATCHES "wine*/lib")
|
||||
SET(WINE_32_FLAGS "-L${WINE_32_LIBRARY_DIR} -L${WINE_32_LIBRARY_DIR}../")
|
||||
SET(WINE_32_LIBRARY_DIRS "${WINE_32_LIBRARY_DIR}:${WINE_32_LIBRARY_DIR}/..")
|
||||
ELSE()
|
||||
SET(WINE_32_FLAGS "-L${WINE_32_LIBRARY_DIR}")
|
||||
SET(WINE_32_LIBRARY_DIRS "${WINE_32_LIBRARY_DIR}")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
IF(WINE_64_LIBRARY_DIR)
|
||||
IF(WINE_64_LIBRARY_DIR MATCHES "wine*/lib")
|
||||
SET(WINE_64_FLAGS "-L${WINE_64_LIBRARY_DIR} -L${WINE_64_LIBRARY_DIR}../")
|
||||
SET(WINE_64_LIBRARY_DIRS "${WINE_64_LIBRARY_DIR}:${WINE_64_LIBRARY_DIR}/..")
|
||||
ELSE()
|
||||
SET(WINE_64_FLAGS "-L${WINE_64_LIBRARY_DIR}")
|
||||
SET(WINE_64_LIBRARY_DIRS "${WINE_64_LIBRARY_DIR}")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
# Create winegcc wrapper
|
||||
configure_file(${CMAKE_CURRENT_LIST_DIR}/winegcc_wrapper.in winegcc_wrapper @ONLY)
|
||||
SET(WINEGCC "${CMAKE_CURRENT_BINARY_DIR}/winegcc_wrapper")
|
||||
|
||||
184
cmake/modules/InstallDependencies.cmake
Normal file
@@ -0,0 +1,184 @@
|
||||
include(GetPrerequisites)
|
||||
include(CMakeParseArguments)
|
||||
|
||||
CMAKE_POLICY(SET CMP0011 NEW)
|
||||
CMAKE_POLICY(SET CMP0057 NEW)
|
||||
|
||||
function(make_absolute var)
|
||||
get_filename_component(abs "${${var}}" ABSOLUTE BASE_DIR "${CMAKE_INSTALL_PREFIX}")
|
||||
set(${var} ${abs} PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
# Reads lines of a file into a list, skipping '#' comment lines
|
||||
function(READ_LIST_FILE FILE VAR)
|
||||
file(STRINGS "${FILE}" list)
|
||||
|
||||
set(result "")
|
||||
foreach(item ${list})
|
||||
string(STRIP "${item}" item)
|
||||
if(item STREQUAL "" OR item MATCHES "^\#")
|
||||
continue()
|
||||
endif()
|
||||
list(APPEND result "${item}")
|
||||
endforeach()
|
||||
|
||||
set(${VAR} ${result} PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
function(make_all_absolute list_var)
|
||||
set(result "")
|
||||
foreach(file ${${list_var}})
|
||||
make_absolute(file)
|
||||
list(APPEND result ${file})
|
||||
endforeach()
|
||||
set(${list_var} ${result} PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
if(CMAKE_BINARY_DIR)
|
||||
set(tmp_lib_dir "${CMAKE_BINARY_DIR}/bundled-libraries")
|
||||
elseif(CMAKE_HOST_UNIX)
|
||||
set(tmp_lib_dir "/tmp/bundled-libraries")
|
||||
elseif(DEFINED ENV{TEMP})
|
||||
set(tmp_lib_dir "$ENV{TMP}/bundled-libraries")
|
||||
else()
|
||||
message(FATAL_ERROR "Can't find a temp dir for libraries")
|
||||
endif()
|
||||
|
||||
# Like file(INSTALL), but resolves symlinks
|
||||
function(install_file_resolved file destination)
|
||||
|
||||
get_filename_component(file_name "${file}" NAME)
|
||||
if(IS_SYMLINK "${file}")
|
||||
get_filename_component(real_path "${file}" REALPATH)
|
||||
get_filename_component(real_name "${real_path}" NAME)
|
||||
file(COPY "${real_path}" DESTINATION "${tmp_lib_dir}")
|
||||
file(RENAME "${tmp_lib_dir}/${real_name}" "${tmp_lib_dir}/${file_name}")
|
||||
set(file_path "${tmp_lib_dir}/${file_name}")
|
||||
else()
|
||||
set(file_path "${file}")
|
||||
endif()
|
||||
|
||||
file(INSTALL "${file_path}" DESTINATION "${destination}")
|
||||
endfunction()
|
||||
|
||||
function(install_resolved)
|
||||
cmake_parse_arguments("" "" "DESTINATION" "FILES" ${ARGN})
|
||||
foreach(file ${_FILES})
|
||||
install_file_resolved("${file}" "${_DESTINATION}")
|
||||
endforeach()
|
||||
endfunction()
|
||||
|
||||
if(CMAKE_CROSSCOMPILING)
|
||||
# If we're cross-compiling, GetPrerequisites may not be able to find system libraries such as kernel32.dll because
|
||||
# they're supplied by the toolchain. To suppress thousands of lines of warnings being printed to the console, we
|
||||
# override gp_resolved_file_type to return "system" for any library in ${IGNORE_LIBS} without trying to resolve the
|
||||
# file first.
|
||||
# GetPrerequisites supports using an override function called gp_resolved_file_type_override, but it's not suited
|
||||
# for our purpose because it's only called by gp_resolved_file_type *after* trying to resolve the file.
|
||||
function(gp_resolved_file_type original_file file exepath dirs type_var)
|
||||
set(file_find "${file}")
|
||||
if(_IGNORE_CASE)
|
||||
# On case-insensitive systems, convert to upper characters to respect it
|
||||
string(TOUPPER "${file_find}" file_find)
|
||||
endif()
|
||||
SET(IGNORE_LIBS ${_IGNORE_LIBS} CACHE INTERNAL "Ignored library names" FORCE)
|
||||
if(IGNORE_LIBS AND ${file_find} IN_LIST IGNORE_LIBS)
|
||||
set(${type_var} system PARENT_SCOPE)
|
||||
else()
|
||||
#_gp_resolved_file_type(${ARGV})
|
||||
_gp_resolved_file_type("${original_file}" "${file}" "${exepath}" "${dirs}" "${type_var}" ${ARGN})
|
||||
endif()
|
||||
endfunction()
|
||||
endif()
|
||||
|
||||
function(INSTALL_DEPENDENCIES)
|
||||
cmake_parse_arguments("" "INCLUDE_SYSTEM;IGNORE_CASE" "GP_TOOL;DESTINATION;IGNORE_LIBS_FILE" "FILES;LIB_DIRS;SEARCH_PATHS;IGNORE_LIBS" ${ARGN})
|
||||
|
||||
# Make paths absolute
|
||||
make_absolute(_DESTINATION)
|
||||
make_all_absolute(_FILES)
|
||||
make_all_absolute(_LIB_DIRS)
|
||||
make_all_absolute(_SEARCH_PATHS)
|
||||
|
||||
if(_INCLUDE_SYSTEM)
|
||||
set(EXCLUDE_SYSTEM 0)
|
||||
else()
|
||||
set(EXCLUDE_SYSTEM 1)
|
||||
endif()
|
||||
|
||||
if(_IGNORE_LIBS_FILE)
|
||||
READ_LIST_FILE("${_IGNORE_LIBS_FILE}" _IGNORE_LIBS)
|
||||
if(_IGNORE_CASE)
|
||||
# On case-insensitive systems, convert to upper characters to respect it
|
||||
string(TOUPPER "${_IGNORE_LIBS}" _IGNORE_LIBS)
|
||||
endif()
|
||||
SET(IGNORE_LIBS ${_IGNORE_LIBS} CACHE INTERNAL "Ignored library names" FORCE)
|
||||
endif()
|
||||
|
||||
if(_GP_TOOL)
|
||||
set(gp_tool "${_GP_TOOL}")
|
||||
endif()
|
||||
|
||||
set(prereqs "")
|
||||
foreach(file ${_FILES})
|
||||
get_filename_component(file_name "${file}" NAME)
|
||||
message("-- Finding prerequisites of ${file_name}")
|
||||
find_prerequisites("${file}" _prereqs
|
||||
${EXCLUDE_SYSTEM} # exclude system files
|
||||
1 # recurse
|
||||
""
|
||||
"${_LIB_DIRS}"
|
||||
"${_SEARCH_PATHS}"
|
||||
"${_IGNORE_LIBS}"
|
||||
)
|
||||
|
||||
list(APPEND prereqs ${_prereqs})
|
||||
endforeach()
|
||||
|
||||
list(REMOVE_DUPLICATES prereqs)
|
||||
|
||||
foreach(prereq ${prereqs})
|
||||
get_filename_component(prereq_name "${prereq}" NAME)
|
||||
|
||||
foreach(rpath ${_SEARCH_PATHS})
|
||||
if(EXISTS "${rpath}/${prereq_name}")
|
||||
list(REMOVE_ITEM prereqs "${prereq}")
|
||||
break()
|
||||
endif()
|
||||
endforeach()
|
||||
endforeach()
|
||||
|
||||
#file(INSTALL ${prereqs} DESTINATION ${_DESTINATION})
|
||||
install_resolved(FILES ${prereqs} DESTINATION "${_DESTINATION}")
|
||||
endfunction()
|
||||
|
||||
# Like get_prerequisites, but returns full paths
|
||||
function(FIND_PREREQUISITES target RESULT_VAR exclude_system recurse
|
||||
exepath dirs rpaths)
|
||||
set(RESULTS)
|
||||
|
||||
get_prerequisites("${target}" _prereqs ${exclude_system} ${recurse}
|
||||
"" "${dirs}" "${rpaths}")
|
||||
|
||||
foreach(prereq ${_prereqs})
|
||||
get_filename_component(prereq_name "${prereq}" NAME)
|
||||
if(_IGNORE_CASE)
|
||||
# Windows is case insensitive.
|
||||
# Use upper characters to respect it.
|
||||
string(TOUPPER "${prereq_name}" prereq_name)
|
||||
endif()
|
||||
if("${prereq_name}" IN_LIST IGNORE_LIBS)
|
||||
continue()
|
||||
endif()
|
||||
|
||||
gp_resolve_item("${LIB_DLL}" "${prereq}" "" "${dirs}" RESOLVED_PREREQ "${rpaths}")
|
||||
|
||||
if(RESOLVED_PREREQ AND IS_ABSOLUTE ${RESOLVED_PREREQ} AND EXISTS ${RESOLVED_PREREQ})
|
||||
list(APPEND RESULTS ${RESOLVED_PREREQ})
|
||||
else()
|
||||
message(FATAL_ERROR "Can't resolve dependency ${prereq}.")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
set(${RESULT_VAR} ${RESULTS} PARENT_SCOPE)
|
||||
endfunction()
|
||||
89
cmake/modules/InstallTargetDependencies.cmake
Normal file
@@ -0,0 +1,89 @@
|
||||
include(DefineInstallVar)
|
||||
|
||||
SET(DEFAULT_SEARCH_DIRECTORIES "${BIN_DIR}" "${LIB_DIR}" "${CMAKE_FIND_ROOT_PATH}" "${CMAKE_PREFIX_PATH}")
|
||||
SET(DEFAULT_SEARCH_SUFFIXES "bin" "lib" "../bin")
|
||||
|
||||
# Like INSTALL_DEPENDENCIES but can be called from regular cmake code
|
||||
# (instead of install(CODE)), takes targets instead of files,
|
||||
# takes care of configuring search paths, and other platform-specific tweaks.
|
||||
# Arguments:
|
||||
# TARGETS: list of cmake targets to install.
|
||||
# NAME: unique string for this install.
|
||||
# DESTINATION: directory path to install the binaries to.
|
||||
# LIB_DIRS: list of paths for looking up dependencies.
|
||||
# LIB_DIRS_SUFFIXES: list of possible suffixes for LIB_DIRS entries.
|
||||
# NO_DEFAULT_PATHS: supply this value to avoid adding DEFAULT_SEARCH_DIRECTORIES
|
||||
# to LIB_DIRS and DEFAULT_SEARCH_SUFFIXES to LIB_DIRS_SUFFIXES.
|
||||
FUNCTION(INSTALL_TARGET_DEPENDENCIES)
|
||||
set(options NO_DEFAULT_PATHS)
|
||||
set(oneValueArgs NAME)
|
||||
set(multiValueArgs TARGETS DESTINATION LIB_DIRS_SUFFIXES LIB_DIRS)
|
||||
cmake_parse_arguments(DEPS "${options}" "${oneValueArgs}"
|
||||
"${multiValueArgs}" ${ARGN} )
|
||||
|
||||
if(NOT DEPS_LIB_DIRS)
|
||||
set(DEPS_LIB_DIRS "")
|
||||
endif()
|
||||
|
||||
# Set default values.
|
||||
if(NOT DEPS_NO_DEFAULT_PATHS)
|
||||
list(APPEND DEPS_LIB_DIRS ${DEFAULT_SEARCH_DIRECTORIES})
|
||||
set(DEPS_LIB_DIRS_SUFFIXES "${DEPS_LIB_DIRS_SUFFIXES}" ${DEFAULT_SEARCH_SUFFIXES})
|
||||
endif()
|
||||
|
||||
FOREACH(TARGET ${DEPS_TARGETS})
|
||||
IF(NOT TARGET ${TARGET})
|
||||
message(FATAL_ERROR "Not a target: ${TARGET}")
|
||||
ENDIF()
|
||||
|
||||
# Collect target output files.
|
||||
LIST(APPEND DEPLOY_TARGETS "$<TARGET_FILE:${TARGET}>")
|
||||
|
||||
# Collect target link directories
|
||||
get_target_property(target_libs ${TARGET} LINK_LIBRARIES)
|
||||
|
||||
foreach(lib ${target_libs})
|
||||
if(TARGET ${lib} OR NOT IS_ABSOLUTE ${lib})
|
||||
continue()
|
||||
endif()
|
||||
|
||||
get_filename_component(lib_dir ${lib} PATH)
|
||||
list(APPEND DEPS_LIB_DIRS ${lib_dir})
|
||||
endforeach()
|
||||
ENDFOREACH()
|
||||
|
||||
LIST(APPEND DEPS_LIB_DIRS ${CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES})
|
||||
|
||||
FOREACH(LIB_PATH ${DEPS_LIB_DIRS})
|
||||
FOREACH(suffix ${DEPS_LIB_DIRS_SUFFIXES})
|
||||
list(APPEND DEPS_LIB_DIRS "${LIB_PATH}/${suffix}")
|
||||
ENDFOREACH()
|
||||
ENDFOREACH()
|
||||
|
||||
DEFINE_INSTALL_VAR(NAME "DEPLOY_FILES" CONTENT "${DEPLOY_TARGETS}" GENERATOR_EXPRESSION)
|
||||
|
||||
LIST(REMOVE_DUPLICATES DEPS_LIB_DIRS)
|
||||
|
||||
IF(LMMS_BUILD_LINUX)
|
||||
FILE(DOWNLOAD "https://raw.githubusercontent.com/AppImage/AppImages/master/excludelist"
|
||||
"${CMAKE_BINARY_DIR}/excludelist")
|
||||
SET(additional_args INCLUDE_SYSTEM IGNORE_LIBS_FILE ${CMAKE_BINARY_DIR}/excludelist)
|
||||
ELSEIF(LMMS_BUILD_WIN32)
|
||||
SET(additional_args IGNORE_CASE IGNORE_LIBS_FILE "${LMMS_SOURCE_DIR}/cmake/install/excludelist-win")
|
||||
IF(CMAKE_CROSSCOMPILING)
|
||||
SET(additional_args "${additional_args}" GP_TOOL objdump)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
INSTALL(CODE "
|
||||
INCLUDE(\"${LMMS_SOURCE_DIR}/cmake/modules/InstallDependencies.cmake\")
|
||||
|
||||
INSTALL_DEPENDENCIES(
|
||||
FILES \"\${DEPLOY_FILES}\"
|
||||
DESTINATION \"${DEPS_DESTINATION}\"
|
||||
LIB_DIRS \"${DEPS_LIB_DIRS}\"
|
||||
SEARCH_PATHS \"${DEPS_SEARCH_PATHS}\"
|
||||
${additional_args}
|
||||
)
|
||||
")
|
||||
ENDFUNCTION()
|
||||
104
cmake/modules/PluginList.cmake
Normal file
@@ -0,0 +1,104 @@
|
||||
# Provides a fast mechanism for filtering the plugins used at build-time
|
||||
SET(PLUGIN_LIST "" CACHE STRING "List of plug-ins to build")
|
||||
STRING(REPLACE " " ";" PLUGIN_LIST "${PLUGIN_LIST}")
|
||||
OPTION(LMMS_MINIMAL "Build a minimal list of plug-ins" OFF)
|
||||
OPTION(LIST_PLUGINS "Lists the available plugins for building" OFF)
|
||||
|
||||
SET(MINIMAL_LIST
|
||||
audio_file_processor
|
||||
kicker
|
||||
triple_oscillator
|
||||
)
|
||||
|
||||
IF(LMMS_MINIMAL)
|
||||
IF("${PLUGIN_LIST}" STREQUAL "")
|
||||
STRING(REPLACE ";" " " MINIMAL_LIST_STRING "${MINIMAL_LIST}")
|
||||
MESSAGE(
|
||||
"-- Using minimal plug-ins: ${MINIMAL_LIST_STRING}\n"
|
||||
" Note: You can specify specific plug-ins using -DPLUGIN_LIST=\"foo bar\""
|
||||
)
|
||||
ENDIF()
|
||||
SET(PLUGIN_LIST ${MINIMAL_LIST} ${PLUGIN_LIST})
|
||||
ENDIF()
|
||||
|
||||
SET(LMMS_PLUGIN_LIST
|
||||
${MINIMAL_LIST}
|
||||
Amplifier
|
||||
BassBooster
|
||||
bit_invader
|
||||
Bitcrush
|
||||
carlabase
|
||||
carlapatchbay
|
||||
carlarack
|
||||
CrossoverEQ
|
||||
Delay
|
||||
DualFilter
|
||||
dynamics_processor
|
||||
Eq
|
||||
Flanger
|
||||
HydrogenImport
|
||||
ladspa_browser
|
||||
LadspaEffect
|
||||
lb302
|
||||
MidiImport
|
||||
MidiExport
|
||||
MultitapEcho
|
||||
monstro
|
||||
nes
|
||||
OpulenZ
|
||||
organic
|
||||
FreeBoy
|
||||
patman
|
||||
peak_controller_effect
|
||||
GigPlayer
|
||||
ReverbSC
|
||||
sf2_player
|
||||
sfxr
|
||||
sid
|
||||
SpectrumAnalyzer
|
||||
stereo_enhancer
|
||||
stereo_matrix
|
||||
stk
|
||||
vst_base
|
||||
vestige
|
||||
VstEffect
|
||||
watsyn
|
||||
waveshaper
|
||||
vibed
|
||||
Xpressive
|
||||
zynaddsubfx
|
||||
)
|
||||
|
||||
IF("${PLUGIN_LIST}" STREQUAL "")
|
||||
SET(PLUGIN_LIST ${LMMS_PLUGIN_LIST})
|
||||
ENDIF()
|
||||
|
||||
MACRO(LIST_ALL_PLUGINS)
|
||||
MESSAGE("\n\nAll possible -DPLUGIN_LIST values")
|
||||
MESSAGE("\n KEYWORD:")
|
||||
MESSAGE(" -DLMMS_MINIMAL=True")
|
||||
FOREACH(item IN LISTS MINIMAL_LIST)
|
||||
MESSAGE(" ${item}")
|
||||
ENDFOREACH()
|
||||
MESSAGE("\n NAME:")
|
||||
FOREACH(item IN LISTS LMMS_PLUGIN_LIST)
|
||||
MESSAGE(" ${item}")
|
||||
ENDFOREACH()
|
||||
MESSAGE("\nNote: This value also impacts the fetching of git submodules.\n")
|
||||
MESSAGE(FATAL_ERROR "Information was requested, aborting build!")
|
||||
ENDMACRO()
|
||||
|
||||
IF(LIST_PLUGINS)
|
||||
UNSET(LIST_PLUGINS CACHE)
|
||||
LIST_ALL_PLUGINS()
|
||||
ENDIF()
|
||||
|
||||
IF(MSVC)
|
||||
SET(MSVC_INCOMPATIBLE_PLUGINS
|
||||
LadspaEffect
|
||||
zynaddsubfx
|
||||
)
|
||||
message(WARNING "Compiling with MSVC. The following plugins are not available: ${MSVC_INCOMPATIBLE_PLUGINS}")
|
||||
LIST(REMOVE_ITEM PLUGIN_LIST ${MSVC_INCOMPATIBLE_PLUGINS})
|
||||
ENDIF()
|
||||
|
||||
77
cmake/modules/winegcc_wrapper.in
Executable file
@@ -0,0 +1,77 @@
|
||||
#!/bin/sh
|
||||
# Wrapper script for winegcc to remove .exe file ending automatically
|
||||
# appended by winebuild.
|
||||
# See FindWine.cmake for usage
|
||||
|
||||
set -e
|
||||
|
||||
args="$@"
|
||||
|
||||
# Find output name, link mode and architecture
|
||||
while [ $# -gt 0 ]; do
|
||||
key="$1"
|
||||
|
||||
case $key in
|
||||
-o)
|
||||
output=$2
|
||||
shift
|
||||
;;
|
||||
-c)
|
||||
no_link=true
|
||||
;;
|
||||
-m32)
|
||||
win32=true
|
||||
;;
|
||||
-m64)
|
||||
win64=true
|
||||
;;
|
||||
*)
|
||||
|
||||
;;
|
||||
esac
|
||||
|
||||
shift
|
||||
done
|
||||
|
||||
if [ -z "$output" ]; then
|
||||
# If -c is used without specifying an output name, GCC defaults to "a.out".
|
||||
if [ "$no_link" != true ]; then
|
||||
output="a.out"
|
||||
no_move=true
|
||||
fi
|
||||
fi
|
||||
|
||||
# Some Wine distributions can't find their own headers. WINE_INCLUDE_DIR provided
|
||||
# by FindWine.cmake
|
||||
extra_args="-I@WINE_INCLUDE_DIR@ -I@WINE_INCLUDE_DIR@/wine/windows"
|
||||
|
||||
# Apply manually specified flags
|
||||
extra_args="$extra_args @WINE_CXX_FLAGS@"
|
||||
|
||||
# Apply -m32 library fix if necessary
|
||||
if [ "$win32" = true ] && [ "$no_link" != true ]; then
|
||||
extra_args="$extra_args @WINE_32_FLAGS@"
|
||||
fi
|
||||
|
||||
# Apply -m64 library fix if necessary
|
||||
if [ "$win64" = true ] && [ "$no_link" != true ]; then
|
||||
extra_args="$extra_args @WINE_64_FLAGS@"
|
||||
fi
|
||||
|
||||
# Work around https://bugs.winehq.org/show_bug.cgi?id=47710
|
||||
extra_args="$extra_args -D__WIDL_objidl_generated_name_0000000C="
|
||||
|
||||
# Run winegcc
|
||||
export WINEBUILD=@WINE_BUILD@
|
||||
@WINE_CXX@ $extra_args $args
|
||||
|
||||
if [ "$no_move" = true ] || [ "$no_link" = true ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ ! -e "$output.exe" ]; then
|
||||
echo "Fatal error in winegcc wrapper: No output file \"$output.exe\" found."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
mv $output.exe $output
|
||||
@@ -1,5 +1,13 @@
|
||||
SET(WIN_PLATFORM mingw)
|
||||
if(LMMS_MSVC_YEAR)
|
||||
SET(WIN_PLATFORM "msvc${LMMS_MSVC_YEAR}")
|
||||
endif()
|
||||
|
||||
SET(CPACK_PACKAGE_ICON "${CMAKE_SOURCE_DIR}/cmake/nsis/nsis_branding.bmp")
|
||||
SET(CPACK_NSIS_MUI_ICON "${CMAKE_SOURCE_DIR}/cmake/nsis/lmms.ico")
|
||||
IF(MSVC)
|
||||
STRING(REPLACE "/" "\\\\" CPACK_PACKAGE_ICON ${CPACK_PACKAGE_ICON})
|
||||
ENDIF(MSVC)
|
||||
SET(CPACK_NSIS_MUI_ICON "${CMAKE_SOURCE_DIR}/cmake/nsis/icon.ico")
|
||||
SET(CPACK_NSIS_INSTALLED_ICON_NAME "${CMAKE_PROJECT_NAME}.exe" PARENT_SCOPE)
|
||||
SET(CPACK_NSIS_DISPLAY_NAME "${PROJECT_NAME_UCASE} ${VERSION}" PARENT_SCOPE)
|
||||
SET(CPACK_NSIS_HELP_LINK "${PROJECT_URL}" PARENT_SCOPE)
|
||||
@@ -8,10 +16,11 @@ SET(CPACK_NSIS_CONTACT "${PROJECT_EMAIL}" PARENT_SCOPE)
|
||||
SET(CPACK_PACKAGE_EXECUTABLES "${CMAKE_PROJECT_NAME}.exe;${PROJECT_NAME_UCASE}" PARENT_SCOPE)
|
||||
SET(CPACK_NSIS_MENU_LINKS "${CMAKE_PROJECT_NAME}.exe;${PROJECT_NAME_UCASE}" PARENT_SCOPE)
|
||||
SET(CPACK_NSIS_DEFINES "
|
||||
!include ${CMAKE_SOURCE_DIR}/cmake/nsis/FileAssociation.nsh
|
||||
!addincludedir ${CMAKE_SOURCE_DIR}/cmake/nsis
|
||||
!include FileAssociation.nsh
|
||||
!include LogicLib.nsh
|
||||
!include WinVer.nsh")
|
||||
SET(CPACK_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}-${VERSION}-win32")
|
||||
SET(CPACK_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}-${VERSION}-${WIN_PLATFORM}-win32")
|
||||
SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "
|
||||
\\\${registerExtension} \\\"$INSTDIR\\\\${CMAKE_PROJECT_NAME}.exe\\\" \\\".mmp\\\" \\\"${PROJECT_NAME_UCASE} Project\\\"
|
||||
\\\${registerExtension} \\\"$INSTDIR\\\\${CMAKE_PROJECT_NAME}.exe\\\" \\\".mmpz\\\" \\\"${PROJECT_NAME_UCASE} Project (compressed)\\\"
|
||||
@@ -27,7 +36,7 @@ SET(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS "
|
||||
" PARENT_SCOPE)
|
||||
|
||||
IF(WIN64)
|
||||
SET(CPACK_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}-${VERSION}-win64")
|
||||
SET(CPACK_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}-${VERSION}-${WIN_PLATFORM}-win64")
|
||||
SET(CPACK_INSTALL_FIX "$PROGRAMFILES64\\\\${CPACK_PACKAGE_INSTALL_DIRECTORY}\\\\")
|
||||
SET(CPACK_NSIS_DEFINES "
|
||||
${CPACK_NSIS_DEFINES}
|
||||
@@ -37,10 +46,10 @@ ENDIF()
|
||||
|
||||
# Fix windows paths for msys
|
||||
IF(LMMS_BUILD_MSYS)
|
||||
STRING(REGEX REPLACE "/" "\\\\\\\\" CPACK_PACKAGE_ICON "${CPACK_PACKAGE_ICON}")
|
||||
STRING(REGEX REPLACE "/" "\\\\\\\\" CPACK_NSIS_MUI_ICON "${CPACK_NSIS_MUI_ICON}")
|
||||
STRING(REGEX REPLACE "/" "\\\\\\\\" CPACK_NSIS_DEFINES "${CPACK_NSIS_DEFINES}")
|
||||
STRING(REGEX REPLACE "/" "\\\\\\\\" CMAKE_BINARY_DIR_FIX "${CMAKE_BINARY_DIR}")
|
||||
STRING(REPLACE "/" "\\\\" CPACK_PACKAGE_ICON "${CPACK_PACKAGE_ICON}")
|
||||
STRING(REPLACE "/" "\\\\" CPACK_NSIS_MUI_ICON "${CPACK_NSIS_MUI_ICON}")
|
||||
STRING(REPLACE "/" "\\\\" CPACK_NSIS_DEFINES "${CPACK_NSIS_DEFINES}")
|
||||
STRING(REPLACE "/" "\\\\" CMAKE_BINARY_DIR_FIX "${CMAKE_BINARY_DIR}")
|
||||
|
||||
# FIXME: there's no easy way to fix $INST_DIR, so we'll redefine it manually
|
||||
IF(WIN64)
|
||||
@@ -71,3 +80,5 @@ IF(LMMS_HAVE_STK)
|
||||
ENDIF()
|
||||
|
||||
INSTALL(FILES "lmms.exe.manifest" DESTINATION .)
|
||||
INSTALL(FILES "lmms.VisualElementsManifest.xml" DESTINATION .)
|
||||
INSTALL(DIRECTORY "assets" DESTINATION .)
|
||||
|
||||
@@ -129,6 +129,7 @@ NoBackup:
|
||||
WriteRegStr HKCR "$R0" "" "$R0"
|
||||
WriteRegStr HKCR "$R0\shell" "" "open"
|
||||
Skip:
|
||||
WriteRegStr HKCR "$R0\DefaultIcon" "" "$R2,1"
|
||||
WriteRegStr HKCR "$R0\shell\open\command" "" '"$R2" "%1"'
|
||||
WriteRegStr HKCR "$R0\shell\edit" "" "Edit $R0"
|
||||
WriteRegStr HKCR "$R0\shell\edit\command" "" '"$R2" "%1"'
|
||||
|
||||
BIN
cmake/nsis/assets/Logo.png
Normal file
|
After Width: | Height: | Size: 5.1 KiB |
BIN
cmake/nsis/assets/SmallLogo.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
cmake/nsis/icon.ico
Normal file
|
After Width: | Height: | Size: 401 KiB |
9
cmake/nsis/lmms.VisualElementsManifest.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<Application xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
|
||||
<VisualElements
|
||||
ShowNameOnSquare150x150Logo='on'
|
||||
Square150x150Logo='assets\Logo.png'
|
||||
Square70x70Logo='assets\SmallLogo.png'
|
||||
Square44x44Logo='assets\SmallLogo.png'
|
||||
ForegroundText='light'
|
||||
BackgroundColor='#249A57'/>
|
||||
</Application>
|
||||
|
Before Width: | Height: | Size: 134 KiB |
@@ -1,4 +1,5 @@
|
||||
lmmsicon ICON cmake/nsis/lmms.ico
|
||||
lmmsicon ICON cmake/nsis/icon.ico
|
||||
lmmsprojecticon ICON cmake/nsis/project.ico
|
||||
#include <windows.h>
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
|
||||
|
Before Width: | Height: | Size: 9.5 KiB After Width: | Height: | Size: 9.5 KiB |
BIN
cmake/nsis/project.ico
Normal file
|
After Width: | Height: | Size: 401 KiB |
@@ -1,4 +0,0 @@
|
||||
IF(LMMS_BUILD_APPLE)
|
||||
INSTALL(CODE "EXECUTE_PROCESS(COMMAND chmod u+x ${CMAKE_BINARY_DIR}/install_apple.sh)")
|
||||
INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${CMAKE_BINARY_DIR}/install_apple.sh)")
|
||||
ENDIF()
|
||||
@@ -1,2 +1,4 @@
|
||||
SET(CMAKE_TOOLCHAIN_FILE_32 "${CMAKE_CURRENT_LIST_DIR}/Ubuntu-MinGW-W64-32.cmake")
|
||||
|
||||
INCLUDE(${CMAKE_CURRENT_LIST_DIR}/common/Win64.cmake)
|
||||
INCLUDE(${CMAKE_CURRENT_LIST_DIR}/common/Ubuntu-MinGW-W64.cmake)
|
||||
|
||||
@@ -3,4 +3,7 @@ SET(MINGW_PREFIX32 /opt/mingw32)
|
||||
|
||||
SET(WIN64 TRUE)
|
||||
|
||||
SET(CMAKE_TOOLCHAIN_FILE_32 "${CMAKE_CURRENT_LIST_DIR}/Ubuntu-MinGW-X-Trusty-32.cmake")
|
||||
SET(CMAKE_PREFIX_PATH_32 "${MINGW_PREFIX32}")
|
||||
|
||||
INCLUDE(${CMAKE_CURRENT_LIST_DIR}/common/Ubuntu-MinGW-X-Trusty.cmake)
|
||||
|
||||