Changeset: 95c6c9179db5 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=95c6c9179db5
Modified Files:
cmake/Modules/FindReadline.cmake
Branch: default
Log Message:
fixed detection of lib readline on macos
diffs (38 lines):
diff --git a/cmake/Modules/FindReadline.cmake b/cmake/Modules/FindReadline.cmake
--- a/cmake/Modules/FindReadline.cmake
+++ b/cmake/Modules/FindReadline.cmake
@@ -1,15 +1,31 @@
# - Find readline
# Find the native readline headers and libraries.
#
-# READLINE_INCLUDE_DIR - where to find readline.h, etc.
+# READLINE_INCLUDE_DIRS - where to find readline.h, etc.
# READLINE_LIBRARIES - List of libraries when using readline.
# READLINE_FOUND - True if readline found.
+find_package(PkgConfig QUIET)
+pkg_check_modules(PC_READLINE QUIET readline>=8.0)
+
+if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Darwin" OR PC_READLINE_FOUND)
+
# Look for the header file.
-find_path(READLINE_INCLUDE_DIR NAMES readline.h PATH_SUFFIXES readline) # On
some systems readline.h is installed under readline directory.
+find_path(READLINE_INCLUDE_DIR NAMES readline/readline.h
+ HINTS
+ ${PC_READLINE_INCLUDEDIR}
+ ${PC_READLINE_INCLUDE_DIRS}
+ PATH_SUFFIXES readline
+ )
# Look for the library.
-find_library(READLINE_LIBRARIES NAMES readline)
+find_library(READLINE_LIBRARIES NAMES readline
+ HINTS
+ ${PC_READLINE_LIBDIR}
+ ${PC_READLINE_LIBRARY_DIRS}
+ )
+
+endif()
# Handle the QUIETLY and REQUIRED arguments and set READLINE_FOUND to TRUE if
all listed variables are TRUE.
include(FindPackageHandleStandardArgs)
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list