Files
third_party_ejdb/cmake/Modules/FindLibIberty.cmake
T
stesen 86b1d0e7f3 Description:[feature] add ejdb
Signed-off-by: stesen <stesen.ma@huawei.com>
Change-Id: Idd85e9f93d8c2fb983958db2c79c1cfdb6f75275
2021-08-18 22:07:30 +08:00

41 lines
1.1 KiB
CMake

# - Find Iberty
# This module finds libiberty.
#
# It sets the following variables:
# IBERTY_LIBRARIES - The libiberty library to link against.
# For Debian <= wheezy, use libiberty_pic.a from binutils-dev
# For Debian >= jessie, use libiberty.a from libiberty-dev
# For all RHEL/Fedora, use libiberty.a from binutils-devel
FIND_LIBRARY( IBERTY_LIBRARIES
NAMES iberty_pic iberty
HINTS ${IBERTY_LIBRARIES}
PATHS
/usr/lib
/usr/lib64
/usr/local/lib
/usr/local/lib64
/opt/local/lib
/opt/local/lib64
/sw/lib
ENV LIBRARY_PATH
ENV LD_LIBRARY_PATH
)
IF (IBERTY_LIBRARIES)
# show which libiberty was found only if not quiet
MESSAGE( STATUS "Found libiberty: ${IBERTY_LIBRARIES}")
SET(IBERTY_FOUND TRUE)
ELSE (IBERTY_LIBRARIES)
IF (IBERTY_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find libiberty. Try to install binutil-devel?")
ELSE()
MESSAGE(STATUS "Could not find libiberty; downloading binutils and building PIC libiberty.")
ENDIF (IBERTY_FIND_REQUIRED)
ENDIF (IBERTY_LIBRARIES)