Author: mcpierce Date: Mon Sep 29 13:13:18 2014 New Revision: 1628177 URL: http://svn.apache.org/r1628177 Log: PROTON-465: FindPerlLibs fails on Ubuntu 12
If the search for libperl.so fails using the standard search in CMake, then this alternative tool kicks in and searchs other known locations for the file. Modified: qpid/proton/trunk/tools/cmake/Modules/FindPerlLibs.cmake Modified: qpid/proton/trunk/tools/cmake/Modules/FindPerlLibs.cmake URL: http://svn.apache.org/viewvc/qpid/proton/trunk/tools/cmake/Modules/FindPerlLibs.cmake?rev=1628177&r1=1628176&r2=1628177&view=diff ============================================================================== --- qpid/proton/trunk/tools/cmake/Modules/FindPerlLibs.cmake (original) +++ qpid/proton/trunk/tools/cmake/Modules/FindPerlLibs.cmake Mon Sep 29 13:13:18 2014 @@ -29,6 +29,25 @@ if(NOT PERLLIBS_FOUND) # if either the library path is not found not set at all # then do our own search + if ( NOT PERL_LIBRARY ) + EXECUTE_PROCESS( COMMAND ${PERL_EXECUTABLE} -V:libperl + OUTPUT_VARIABLE PERL_LIBRARY_OUTPUT + RESULT_VARIABLE PERL_LIBRARY_RESULT ) + + IF ( NOT PERL_LIBRARY_RESULT ) + string(REGEX REPLACE "libperl='([^']+)'.*" "\\1" PERL_POSSIBLE_LIBRARIES ${PERL_LIBRARY_OUTPUT}) + ENDIF ( NOT PERL_LIBRARY_RESULT ) + + MESSAGE ( STATUS "Looking for ${PERL_POSSIBLE_LIBRARIES}" ) + + find_file(PERL_LIBRARY + NAMES ${PERL_POSSIBLE_LIBRARIES} + PATHS /usr/lib + ${PERL_ARCHLIB}/CORE + ) + + endif ( NOT PERL_LIBRARY ) + IF ( PERL_LIBRARY MATCHES .*-NOTFOUND OR NOT PERL_LIBRARY ) EXECUTE_PROCESS ( COMMAND ${PERL_EXECUTABLE} -MConfig -e "print \$Config{libperl}" --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org For additional commands, e-mail: commits-h...@qpid.apache.org