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

[Installation] On CentOS install to /usr/lib64 #73

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
8 changes: 6 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ if(KS_PLAT_LIN)
find_package(Git)
find_program(GZIP_CMD gzip)
find_program(DATE_CMD date)
include(GNUInstallDirs)
endif()

# Fixes build on older gcc, Debian Jessie
Expand Down Expand Up @@ -79,6 +80,9 @@ endif()
if("${CMAKE_OS_NAME}" STREQUAL "Centos")

# Enable component install
# Install shared libraries to /usr/lib64
set(CMAKE_INSTALL_LIBDIR lib64 CACHE PATH "Library installation location" FORCE)
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
set(CPACK_RPM_COMPONENT_INSTALL ON)

# Find stuff we need for packaging on Centos
Expand Down Expand Up @@ -306,7 +310,7 @@ include(CPack)
# us to run the apps from the build dir without installing (come install time
# the binary is re-linked with an rpath matching that of the install prefix)
set(SKIP_BUILD_RPATH TRUE)
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")

# Use the link path for the rpath
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
Expand Down Expand Up @@ -390,7 +394,7 @@ set(CONF_INCLUDE_DIRS "${PROJECT_SOURCE_DIR}" "${PROJECT_BINARY_DIR}")

if (NOT KS_PLAT_WIN)
# Set install targets
install(TARGETS signalwire_client COMPONENT "runtime" EXPORT SignalWireClientConfig DESTINATION lib)
install(TARGETS signalwire_client COMPONENT "runtime" EXPORT SignalWireClientConfig DESTINATION ${CMAKE_INSTALL_LIBDIR})
install(DIRECTORY inc/signalwire-client-c COMPONENT "runtime" DESTINATION include PATTERN internal EXCLUDE)

# Set path for pkg-config based on ARCH and distro type
Expand Down
2 changes: 1 addition & 1 deletion signalwire_client.pc.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
prefix=@PC_PREFIX@
exec_prefix=${prefix}
libdir=${prefix}/lib
libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
includedir=${prefix}/include
definitions=@PC_DEFINITIONS@

Expand Down