Could NOT find ZMusic (missing: ZMUSIC_LIBRARIES ZMUSIC_INCLUDE_DIR)

 Compiling GZDoom from source, running into issues with ZMusic

If you get this error:

"Could NOT find ZMusic (missing: ZMUSIC_LIBRARIES ZMUSIC_INCLUDE_DIR)"


You need to view this post here in order to build ZMusic library:

https://forum.zdoom.org/viewtopic.php?t=67489


Once you build ZMusic, the files simply just exist in the build folder.  The trick is modifying the GZDoom build script to point to the ZMusic files

Original build script:

a='' && [ "$(uname -m)" = x86_64 ] && a=64
c="$(lscpu -p | grep -v '#' | sort -u -t , -k 2,4 | wc -l)" ; [ "$c" -eq 0 ] && c=1
cd ~/gzdoom_build/gzdoom/build &&
rm -f output_sdl/liboutput_sdl.so &&
if [ -d ../fmodapi44464linux ]; then
f="-DFMOD_LIBRARY=../fmodapi44464linux/api/lib/libfmodex${a}-4.44.64.so \
-DFMOD_INCLUDE_DIR=../fmodapi44464linux/api/inc"; else
f='-UFMOD_LIBRARY -UFMOD_INCLUDE_DIR'; fi &&
cmake .. -DCMAKE_BUILD_TYPE=Release $f &&
make -j$c
Modified build script to point to ZMusic files that were just built (added lines bolded):
a='' && [ "$(uname -m)" = x86_64 ] && a=64
c="$(lscpu -p | grep -v '#' | sort -u -t , -k 2,4 | wc -l)" ; [ "$c" -eq 0 ] && c=1
cd ~/gzdoom_build/gzdoom/build &&
rm -f output_sdl/liboutput_sdl.so &&
if [ -d ../fmodapi44464linux ]; then
f="-DFMOD_LIBRARY=../fmodapi44464linux/api/lib/libfmodex${a}-4.44.64.so \
-DFMOD_INCLUDE_DIR=../fmodapi44464linux/api/inc"; else
f='-UFMOD_LIBRARY -UFMOD_INCLUDE_DIR'; fi &&
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=~/Downloads/ZMusic/build_install/lib -DZMUSIC_INCLUDE_DIR=~/Downloads/ZMusic/build_install/include $f &&
make -j$c

Hope this helps someone out there




Comments

Popular posts from this blog

Vue Js & Papa Parse (Part II): Parsing server side CSVs without webpack / vue-cli bundling / code splitting

Mechanical Keyboard Review: Varmilo VA108M