PortAudio / portaudio

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

Build system does not respect -DCMAKE_INSTALL_INCLUDEDIR in `make install` command #928

Closed RobertAlbus closed 4 weeks ago

RobertAlbus commented 4 weeks ago

Describe the bug When installing PortAudio with make install the header is placed at /include/portaudio.h instead of CMAKE_INSTALL_PREFIX/CMAKE_INSTALL_INCLUDEDIR/portaudio.h

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

  1. CMake generation
    $ mkdir build && ch build
    $ cmake -DCMAKE_INSTALL_PREFIX=/dependencies -DCMAKE_INSTALL_INCLUDEDIR=include/portaudio ..
  2. Build and install
    $ make build
    $ make install
  3. Examine installation directory
    $ ls /dependencies
    dependencies/include/portaudio.h
    # configured directory was /dependencies/include/portaudio/portaudio.h

Expected behavior The header should be installed at the configured location:

Actual behavior Regardless of configuration, the header is installed at:

Desktop (please complete the following information):

Additional context This works with most other libraries that define an install target.

RobertAlbus commented 4 weeks ago

Closing this issue because it is is solved on master with the following CMake arguments:

cmake -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR \
        -DCMAKE_INSTALL_INCLUDEDIR=include/portaudio \
        -DCMAKE_FRAMEWORK=FALSE \
        ..