PortAudio / portaudio

PortAudio is a cross-platform, open-source C language library for real-time audio input and output.
Other
1.53k stars 309 forks source link

cmake setup does not build cpp bindings #539

Open dvzrv opened 3 years ago

dvzrv commented 3 years ago

Describe the bug When building 19.7.0 using cmake on Arch Linux, I noticed, that the setup is not able to build the C++ bindings.

To Reproduce Steps to reproduce the behavior. Include code if applicable.

  cmake -DCMAKE_INSTALL_PREFIX=/usr \
        -DCMAKE_BUILD_TYPE='None' \
        -DPA_ALSA_DYNAMIC=ON \
        -DPA_BUILD_TESTS=ON \
        -Wno-dev \
        -B build \
        -S .
  make VERBOSE=1 -C build
  make VERBOSE=1 test -C build
  make DESTDIR="${pkgdir}" install -C build
  install -vDm 644 LICENSE.txt -t "${pkgdir}/usr/share/licenses/${pkgname}"
  install -vDm 644 README.* -t "${pkgdir}/usr/share/doc/${pkgname}"

Expected behavior The C++ bindings can also be built using the cmake setup and are created with the correct shared object versions (example data from the 19.6.0 package):

lrwxrwxrwx root/root         0 2020-06-03 13:52 usr/lib/libportaudio.so -> libportaudio.so.2.0.0
lrwxrwxrwx root/root         0 2020-06-03 13:52 usr/lib/libportaudio.so.2 -> libportaudio.so.2.0.0
-rwxr-xr-x root/root    195792 2020-06-03 13:52 usr/lib/libportaudio.so.2.0.0
lrwxrwxrwx root/root         0 2020-06-03 13:52 usr/lib/libportaudiocpp.so -> libportaudiocpp.so.0.0.12
lrwxrwxrwx root/root         0 2020-06-03 13:52 usr/lib/libportaudiocpp.so.0 -> libportaudiocpp.so.0.0.12
-rwxr-xr-x root/root     63256 2020-06-03 13:52 usr/lib/libportaudiocpp.so.0.0.12

Actual behavior Only the shared object for libportaudio.so is created, but without versioning (see #538):

-rwxr-xr-x root/root    187656 2021-04-06 21:38 usr/lib/libportaudio.so

Desktop (please complete the following information):

Additional context Without the possibility of also building the C++ bindings, using the cmake setup is not yet an alternative to the autotools setup (as libportaudiocpp.so is required for some dependants (e.g. xournalpp).

RossBencina commented 3 years ago

We're going to move C++ bindings to their own repo #548

Be-ing commented 3 years ago

I started working on this in #434. I rebased those commits on master on this branch, which could be used to resume work on this after new repository is created.

Biswa96 commented 2 years ago

Any progress on this topic? Hope this will be fixed soon.

Be-ing commented 2 years ago

The new repository hasn't been created yet for the C++ bindings. @RossBencina @philburk could you set that up?

volkanorhan commented 2 years ago

I started working on this in #434. I rebased those commits on master on this branch, which could be used to resume work on this after new repository is created.

I added some commits to your cpp_cmake branch @Be-ing and did a pull request . Can you please review my pull request? I also added comments to my commits.