Hi!
I have a CMakefile with the following code:
find_package(Readline)
if(READLINE_FOUND)
set(CMAKE_REQUIRED_LIBRARIES "readline")
check_function_exists(rl_filename_completion_function
HAVE_RL_COMPLETION_FUNCTION)
if(HAVE_RL_COMPLETION_FUNCTION)
set(HAVE_LIBREADLINE 1)
else()
unset(READLINE_FOUND)
endif(HAVE_RL_COMPLETION_FUNCTION)
set(CMAKE_REQUIRED_LIBRARIES "")
endif(READLINE_FOUND)
If it finds libreadline.so it also finds the
rl_filename_completion_function. But it it finds libreadline.a it does not.
-- Found READLINE: /usr/lib/x86_64-linux-gnu/libreadline.so
-- Looking for rl_filename_completion_function
-- Looking for rl_filename_completion_function - found
-- Configuring done
-- Generating done
-- Build files have been written to: /home/hatari/temp
-- Found READLINE: /usr/lib/x86_64-linux-gnu/libreadline.a
-- Looking for rl_filename_completion_function
-- Looking for rl_filename_completion_function - not found
-- Configuring done
-- Generating done
-- Build files have been written to: /home/hatari/temp
Both .a and .so have that function:
hatari@friend:/usr/lib/x86_64-linux-gnu$ nm -D libreadline.so | grep
rl_filename_completion_function
000000000001abe0 T rl_filename_completion_function
hatari@friend:/usr/lib/x86_64-linux-gnu$ nm libreadline.a | grep
rl_filename_completion_function
00000000000015e0 T rl_filename_completion_function
U rl_filename_completion_function
Any hints?
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Kitware offers various services to support the CMake community. For more
information on each offering, please visit:
CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake