Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Open
AliceLR wants to merge 1 commit into
xiph:main from
AliceLR:fix-cmake-build-framework
Open

Fix CMake BUILD_FRAMEWORK source include dir and 'make install'. #111
AliceLR wants to merge 1 commit into
xiph:main from
AliceLR:fix-cmake-build-framework

Conversation

@AliceLR

@AliceLR AliceLR commented Oct 11, 2024

Copy link
Copy Markdown
  • 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

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /