Author Topic: override CMake default  (Read 749 times)

0 Members and 1 Guest are viewing this topic.

Offline oberon

  • Core Team
  • *****
  • Posts: 3858
  • I'm nice. Be new!
  • Branch: unstable
  • Desktop: i3, Deepin, Cinnamon
  • GPU Card: Intel ValleyView Gen7
  • GPU driver: Intel
  • Kernel: 4.1 / 4.4
  • Skill: Intermediate
override CMake default
« on: 27. April 2016, 17:54:11 »
I am trying to compile the lates git snapshot of MuseScore
Build with just
Code: [Select]
  cd MuseScore
  make revision
  make PREFIX='/usr' SUFFIX="-git" LABEL="Git Build" release
fails with
Code: [Select]
CMake Error at CMakeLists.txt:299 (MESSAGE):
  Error: jack support requested (BUILD_JACK=ON), but jack was not found

CMake Error at CMakeLists.txt:321 (message):
  Error: Portaudio support requested (BUILD_PORTAUDIO=ON), but portaudio-2.0
  Version 19 was not found (package portaudio19-dev)

So I would like to build without jack or portaudio and therefor override those options in CMakeLists.txt.
But I can't seem to find the right syntax to do that...
I have tried something like
Code: [Select]
  make revision
  cmake -BUILD_JACK=OFF -BUILD_PORTAUDIO=OFF .
  make PREFIX='/usr' SUFFIX="-git" LABEL="Git Build" release
or
Code: [Select]
cmake -D -BUILD_JACK=OFF -D -BUILD_PORTAUDIO=OFF .That doesn't work. Either the override is being ignored or I get an error about path not existing...
What am I doing wrong?
manjaro is addictive ::)
* manjaro-i3  * manjaro-cinnamon  * manjaro-deepin

Offline Kirek

  • Core Team
  • *****
  • Posts: 1209
  • Branch: unstable
  • Desktop: Plasma 5
  • GPU Card: Intel HD4000 + Nvidia 620M / Geforxe GTX 970
  • GPU driver: nonfree
  • Kernel: Latest
  • Skill: Intermediate
Re: override CMake default
« Reply #1 on: 27. April 2016, 18:19:46 »
When you do
Code: [Select]
make PREFIX='/usr' SUFFIX="-git" LABEL="Git Build" release
 it does all of this:
Code: [Select]
release:
      if test ! -d build.release; then mkdir build.release; fi; \
      cd build.release;                          \
      export PATH=${BINPATH};                    \
      cmake -DCMAKE_BUILD_TYPE=RELEASE        \
    -DCMAKE_TOOLCHAIN_FILE="${CMAKE_TOOLCHAIN_FILE}"       \
    -DCMAKE_INSTALL_PREFIX="${PREFIX}"       \
    -DMSCORE_INSTALL_SUFFIX="${SUFFIX}"      \
    -DMUSESCORE_LABEL="${LABEL}"             \
    -DBUILD_LAME="${BUILD_LAME}"             \
    -DCMAKE_SKIP_RPATH="${NO_RPATH}"     ..; \
      make lrelease;                             \
      make -j ${CPUS};                           \

so it overwrites the previous cmake, so you should invoke your own cmake, and add -DBUILD_JACK=OFF and -DBUILD_PORTAUDIO=OFF at the end, then make lrelease and make

Code: [Select]
     
      cmake -DCMAKE_BUILD_TYPE=RELEASE        \
    -DCMAKE_INSTALL_PREFIX="/usr"       \
    -DMSCORE_INSTALL_SUFFIX="-git"      \
    -DMUSESCORE_LABEL="Git Build"             \
    -DBUILD_LAME="ON"             \
    -DCMAKE_SKIP_RPATH="FALSE" \
          -DBUILD_JACK=OFF \
          -DBUILD_PORTAUDIO=OFF
      make lrelease
      make

or something similar
« Last Edit: 27. April 2016, 18:23:37 by Kirek »

Offline oberon

  • Core Team
  • *****
  • Posts: 3858
  • I'm nice. Be new!
  • Branch: unstable
  • Desktop: i3, Deepin, Cinnamon
  • GPU Card: Intel ValleyView Gen7
  • GPU driver: Intel
  • Kernel: 4.1 / 4.4
  • Skill: Intermediate
Re: override CMake default
« Reply #2 on: 27. April 2016, 18:39:46 »
Got it! :D
Great, thank you! Working now :)
manjaro is addictive ::)
* manjaro-i3  * manjaro-cinnamon  * manjaro-deepin