Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CMake BUILD_FRAMEWORK source include dir and 'make install'. #111

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

AliceLR
Copy link

@AliceLR AliceLR commented Oct 11, 2024

  • The CMakeFiles.txt did not specify a source include directory for BUILD_FRAMEWORK builds, causing builds to fail due to missing headers when using a build directory other than the source directory.
  • The CMakeFiles.txt was missing an install command for BUILD_FRAMEWORK builds, so make install would fail to actually install the framework. This patch specifies the framework install destination as CMAKE_INSTALL_PREFIX to match libogg.

Be advised I'm not an experienced CMake user and this is a copypaste job, so there is almost certainly a cleaner way to do this.

To reproduce the issues this resolves, do the following from the Vorbis repository root on macOS:

mkdir -p BUILD/_install
cd BUILD
cmake -B . -S .. -D BUILD_FRAMEWORK=1 -D BUILD_TESTING=0 \
    -D CMAKE_FRAMEWORK_PATH=[location of Ogg.framework] \
    -D CMAKE_INSTALL_PREFIX="$(pwd)/_install"

# Will fail without this patch due to a missing header.
# For Vorbis 1.3.7, the failure was mdct.c due to missing vorbis/codec.h
# For Git, the failure is vorbisenc.c due to missing modes/floor_all.h
# This patch resolves either.
make

# Will not install Vorbis.framework to CMAKE_INSTALL_PREFIX without this patch.
make install

+ The CMakeFiles.txt did not specify a source include directory
  for BUILD_FRAMEWORK builds, causing builds to fail due to
  missing headers when using a build directory other than the
  source directory.
+ The CMakeFiles.txt was missing an install command for
  BUILD_FRAMEWORK builds, so "make install" would fail to actually
  install the framework. This patch specifies the framework install
  destination as CMAKE_INSTALL_PREFIX to match libogg.

Be advised I'm not an experienced CMake user and this is a copypaste
job, so there is almost certainly a cleaner way to do this.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant