Commit 6470bbef authored by Brenden Blanco's avatar Brenden Blanco

Use GNUInstallDirs for LIBDIR variable

This should be supported in older versions of cmake, but haven't
explicitly tested those.

Fixes: #243
Signed-off-by: default avatarBrenden Blanco <bblanco@plumgrid.com>
parent 15d1f3b4
...@@ -9,10 +9,7 @@ enable_testing() ...@@ -9,10 +9,7 @@ enable_testing()
include(cmake/GetGitRevisionDescription.cmake) include(cmake/GetGitRevisionDescription.cmake)
include(cmake/version.cmake) include(cmake/version.cmake)
get_property(LIB64 GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS) include(GNUInstallDirs)
if(LIB64)
set(LIBSUFFIX 64)
endif()
if(NOT PYTHON_ONLY) if(NOT PYTHON_ONLY)
find_package(BISON) find_package(BISON)
......
usr/include/bcc/* usr/include/bcc/*
usr/lib/libbcc* /usr/lib/x86_64-linux-gnu/ usr/lib/x86_64-linux-gnu/libbcc*
usr/share/bcc/include/* usr/share/bcc/include/*
...@@ -51,7 +51,7 @@ set(clang_libs ${libclangFrontend} ${libclangSerialization} ${libclangDriver} ${ ...@@ -51,7 +51,7 @@ set(clang_libs ${libclangFrontend} ${libclangSerialization} ${libclangDriver} ${
target_link_libraries(bcc b_frontend clang_frontend ${clang_libs} ${llvm_libs} LLVMBPFCodeGen) target_link_libraries(bcc b_frontend clang_frontend ${clang_libs} ${llvm_libs} LLVMBPFCodeGen)
install(TARGETS bcc LIBRARY COMPONENT libbcc install(TARGETS bcc LIBRARY COMPONENT libbcc
DESTINATION lib${LIBSUFFIX}) DESTINATION ${CMAKE_INSTALL_LIBDIR})
install(DIRECTORY export/ COMPONENT libbcc install(DIRECTORY export/ COMPONENT libbcc
DESTINATION share/bcc/include/bcc DESTINATION share/bcc/include/bcc
FILES_MATCHING PATTERN "*.h") FILES_MATCHING PATTERN "*.h")
...@@ -61,6 +61,6 @@ install(DIRECTORY compat/linux/ COMPONENT libbcc ...@@ -61,6 +61,6 @@ install(DIRECTORY compat/linux/ COMPONENT libbcc
DESTINATION include/bcc/compat/linux DESTINATION include/bcc/compat/linux
FILES_MATCHING PATTERN "*.h") FILES_MATCHING PATTERN "*.h")
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libbcc.pc COMPONENT libbcc install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libbcc.pc COMPONENT libbcc
DESTINATION lib${LIBSUFFIX}/pkgconfig) DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
add_subdirectory(frontends) add_subdirectory(frontends)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment