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 compiler warnings #2

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,19 @@ project(espeak-ng
HOMEPAGE_URL "https://github.com/espeak-ng/espeak-ng"
)

set(CMAKE_SKIP_BUILD_RPATH FALSE)
set(BUILD_RPATH_USE_ORIGIN TRUE)
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)

if(NOT APPLE)
set(ESPEAK_NG_RPATH_ORIGIN "$ORIGIN")
else()
set(ESPEAK_NG_RPATH_ORIGIN "@loader_path")
endif()

set(CMAKE_INSTALL_RPATH ${ESPEAK_NG_RPATH_ORIGIN})
set(CMAKE_BUILD_RPATH ${ESPEAK_NG_RPATH_ORIGIN})

option(BUILD_ESPEAK_NG_EXE "Whether to build espeak-ng-bin" ON)
option(BUILD_ESPEAK_NG_TESTS "Whether to build tests" ON)

Expand Down
1 change: 1 addition & 0 deletions src/libespeak-ng/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ add_library(espeak-ng
)

target_include_directories(espeak-ng BEFORE PRIVATE $<TARGET_PROPERTY:espeak-include,INTERFACE_INCLUDE_DIRECTORIES>)
target_link_libraries(espeak-ng PRIVATE "-Wl,-rpath,${ESPEAK_NG_RPATH_ORIGIN}")
Copy link
Author

Choose a reason for hiding this comment

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

This commit should fix
rhasspy/piper#286


if (NOT MSVC)
target_compile_options(espeak-ng PRIVATE
Expand Down