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

Install CentOS shared libraries to /usr/lib64 #75

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
9 changes: 7 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ endif()
# Fixes build on older gcc, Debian Jessie
if(KS_PLAT_LIN)
set(CMAKE_C_STANDARD 99)
include(GNUInstallDirs)
endif()

if (KS_PLAT_WIN OR WITH_KS_TEST)
Expand Down Expand Up @@ -58,7 +59,7 @@ endif()
# 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}")

# Now detect a bunch of platform stuff
include(CheckFunctionExists)
Expand Down Expand Up @@ -106,6 +107,10 @@ endif()
# Centos packaging
if("${CMAKE_OS_NAME}" STREQUAL "Centos")

# 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}")

# Enable component install
set(CPACK_RPM_COMPONENT_INSTALL ON)

Expand Down Expand Up @@ -558,7 +563,7 @@ export(TARGETS ks
if (NOT KS_PLAT_WIN)

# Set install targets
install(TARGETS ks COMPONENT "runtime" EXPORT LibKSConfig DESTINATION lib)
install(TARGETS ks COMPONENT "runtime" EXPORT LibKSConfig DESTINATION ${CMAKE_INSTALL_LIBDIR})
install(DIRECTORY src/include/libks COMPONENT "runtime" DESTINATION include PATTERN src/include/libks/internal EXCLUDE)

# Set path for pkg-config based on ARCH and distro type
Expand Down
2 changes: 1 addition & 1 deletion libks.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