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

macOS の dylib 向けに rpath を追加 #251

Merged
merged 2 commits into from
Aug 21, 2022

Conversation

PickledChair
Copy link
Member

内容

macOS の dylib に rpath として @loader_path/ を追加しました。

以前のコメント #203 (comment) で、macOS の dylib について rpath の追加をしなくても良いということを言ったのですが、その後、ビルド済みのエンジンでは問題ないと思われるものの、ビルドしていない状態のエンジンで --voicelib_dir オプションでコアの場所を指定するユースケースでは特に rpath を追加した方が良いと感じました。

以前の CMake の設定を改めて確認すると @loader_path/ を rpath として追加していたので、これと同様の設定を行いました。

if (APPLE)
# 参考 https://gist.github.com/robertmaynard/5750737
set_property(TARGET core PROPERTY INSTALL_RPATH "@loader_path/")
elseif (UNIX)
set_property(TARGET core PROPERTY INSTALL_RPATH "$ORIGIN")
endif ()

関連 PR

ref #203

その他

Copy link
Contributor

@qwerty2501 qwerty2501 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

こっちのほうがいいかも

crates/voicevox_core_c_api/build.rs Outdated Show resolved Hide resolved
Copy link
Member

@Hiroshiba Hiroshiba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PGTM!!

Co-authored-by: qwerty2501 <939468+qwerty2501@users.noreply.github.com>
@PickledChair
Copy link
Member Author

@qwerty2501

こっちのほうがいいかも

確かにです。変更しました!

Copy link
Contributor

@qwerty2501 qwerty2501 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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.

3 participants