Use CMake
Hello!
I am the current CALF maintainer, and this is my first MR (since from 0.90.4, CALF provides CMake and deprecates automake). I tried to do everything as I think would be correct, but I have no idea how to test it. I just ran "makepkg", but that did not work:
[100%] Built target calfjackhost
==> Betrete fakeroot Umgebung...
==> Beginne package()...
[ 28%] Built target calf
[ 56%] Built target calfgui
[ 58%] Built target calfmakerdf
[ 91%] Built target calflv2gui
[100%] Built target calfjackhost
Install the project...
-- Install configuration: "Release"
-- Installing: /home/johannes/cprogs/archlinux-calf/pkg/calf/usr/share/calf/presets.xml
-- Installing: /home/johannes/cprogs/archlinux-calf/pkg/calf/usr/share/calf/calf-gui.xml
-- Installing: /home/johannes/cprogs/archlinux-calf/pkg/calf/usr/bin/calfjackhost
-- Installing: /home/johannes/cprogs/archlinux-calf/pkg/calf/usr/lib/calf/libcalf.so
-- Installing: /home/johannes/cprogs/archlinux-calf/pkg/calf/usr/lib/calf/libcalflv2gui.so
Error creating directory "/usr/lib/lv2/calf.lv2".
CMake Error: failed to create symbolic link '/usr/lib/lv2/calf.lv2/calf.so': No such file or directory
CMake Error: failed to create symbolic link '/usr/lib/lv2/calf.lv2/calflv2gui.so': No such file or directory
This is likely caused by this code in calf's src/CMakeLists.txt:
# Create symlinks from Lv2 install dir to libs
install(CODE "execute_process( \
COMMAND \"${CMAKE_COMMAND}\" -E create_symlink \
\"${CMAKE_INSTALL_PREFIX}/lib/${PROJECT_NAME}/lib${PROJECT_NAME}.so\" \
\"${CMAKE_INSTALL_PREFIX}/lib/lv2/${PROJECT_NAME}.lv2/${PROJECT_NAME}.so\" \
)"
But why? Can CMAKE_INSTALL_PREFIX
not be used in makepkg? Or do I need to prepend something before ${CMAKE_INSTALL_PREFIX}
in that CMakeLists.txt?
Thanks on advance!