2018-12-28 19:20:48 -05:00
|
|
|
if(NOT LIBXTRX_FOUND)
|
2019-07-25 20:04:42 -04:00
|
|
|
|
2018-12-28 19:20:48 -05:00
|
|
|
pkg_check_modules (LIBXTRX_PKG libxtrx)
|
2019-07-25 20:04:42 -04:00
|
|
|
|
|
|
|
find_path(LIBXTRX_INCLUDE_DIRS
|
2019-01-02 13:13:50 -05:00
|
|
|
NAMES xtrx_api.h
|
2019-07-25 20:04:42 -04:00
|
|
|
HINTS ${XTRX_DIR}/include
|
2019-01-02 13:13:50 -05:00
|
|
|
${LIBXTRX_PKG_INCLUDE_DIRS}
|
2019-07-25 20:04:42 -04:00
|
|
|
PATHS /usr/include
|
2019-01-02 13:13:50 -05:00
|
|
|
/usr/local/include
|
2018-12-28 19:20:48 -05:00
|
|
|
)
|
2019-07-25 20:04:42 -04:00
|
|
|
|
2019-01-02 13:13:50 -05:00
|
|
|
find_library(LIBXTRX_LIBRARY
|
|
|
|
NAMES xtrx
|
2019-07-25 20:04:42 -04:00
|
|
|
HINTS ${XTRX_DIR}/lib
|
|
|
|
${CMAKE_INSTALL_PREFIX}/lib
|
2019-01-02 13:13:50 -05:00
|
|
|
${CMAKE_INSTALL_PREFIX}/lib64
|
2019-07-25 20:04:42 -04:00
|
|
|
PATHS /usr/local/lib
|
2019-01-02 13:13:50 -05:00
|
|
|
/usr/local/lib64
|
|
|
|
/usr/lib
|
|
|
|
/usr/lib64
|
2018-12-28 19:20:48 -05:00
|
|
|
)
|
|
|
|
|
2019-01-02 13:13:50 -05:00
|
|
|
if(LIBXTRX_INCLUDE_DIRS AND LIBXTRX_LIBRARY)
|
|
|
|
set(LIBXTRX_FOUND TRUE CACHE INTERNAL "libxtrx found")
|
|
|
|
message(STATUS "Found libxtrx: ${LIBXTRX_INCLUDE_DIRS}, ${LIBXTRX_LIBRARY}")
|
|
|
|
else()
|
|
|
|
set(LIBXTRX_FOUND FALSE CACHE INTERNAL "libxtrx found")
|
|
|
|
message(STATUS "libxtrx not found.")
|
|
|
|
endif()
|
2018-12-28 19:20:48 -05:00
|
|
|
|
2019-05-21 14:40:16 -04:00
|
|
|
mark_as_advanced(LIBXTRX_INCLUDE_DIRS LIBXTRX_LIBRARY)
|
2018-12-28 19:20:48 -05:00
|
|
|
|
|
|
|
endif(NOT LIBXTRX_FOUND)
|