uti: cmake: Add include dir pointing to libsyscall_intercept_hook_point.h

Change-Id: Iaea58725a16722d867cb27ffb4d9347b8756f9f2
This commit is contained in:
Masamichi Takagi
2019-06-03 12:37:13 +09:00
parent fb924ebb9d
commit e58e1c6e33
2 changed files with 7 additions and 2 deletions

View File

@ -88,6 +88,9 @@ option(ENABLE_QLMPI "Enable qlmpi programs" OFF)
option(ENABLE_UTI "Enable uti support" OFF)
option(ENABLE_UBSAN "Enable undefined behaviour sanitizer on mckernel size" OFF)
find_package(PkgConfig REQUIRED)
set(PKG_CONFIG_USE_CMAKE_PREFIX_PATH ON)
find_library(LIBRT rt)
find_library(LIBNUMA numa)
find_library(LIBBFD bfd)
@ -98,7 +101,8 @@ if (ENABLE_QLMPI)
endif()
if (ENABLE_UTI)
find_library(LIBSYSCALL_INTERCEPT syscall_intercept)
pkg_check_modules(LIBSYSCALL_INTERCEPT REQUIRED libsyscall_intercept)
link_directories(${LIBSYSCALL_INTERCEPT_LIBRARY_DIRS})
endif()
string(REGEX REPLACE "^([0-9]+)\\.([0-9]+)\\.([0-9]+)(-([0-9]+)(.*))?" "\\1;\\2;\\3;\\5;\\6" LINUX_VERSION ${UNAME_R})

View File

@ -58,7 +58,8 @@ endif()
if (ENABLE_UTI)
add_library(mck_syscall_intercept SHARED syscall_intercept.c arch/${ARCH}/archdep_c.c)
target_link_libraries(mck_syscall_intercept ${LIBSYSCALL_INTERCEPT})
target_link_libraries(mck_syscall_intercept ${LIBSYSCALL_INTERCEPT_LIBRARIES})
target_include_directories(mck_syscall_intercept PRIVATE ${LIBSYSCALL_INTERCEPT_INCLUDE_DIRS})
set_target_properties(mck_syscall_intercept PROPERTIES INSTALL_RPATH_USE_LINK_PATH TRUE)
install(TARGETS mck_syscall_intercept