Author: gsim Date: Fri Oct 10 12:58:18 2014 New Revision: 1630866 URL: http://svn.apache.org/r1630866 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/branches/examples/tools/cmake/Modules/FindPerlLibs.cmake Modified: qpid/proton/branches/examples/tools/cmake/Modules/FindPerlLibs.cmake URL: http://svn.apache.org/viewvc/qpid/proton/branches/examples/tools/cmake/Modules/FindPerlLibs.cmake?rev=1630866&r1=1630865&r2=1630866&view=diff ============================================================================== --- qpid/proton/branches/examples/tools/cmake/Modules/FindPerlLibs.cmake (original) +++ qpid/proton/branches/examples/tools/cmake/Modules/FindPerlLibs.cmake Fri Oct 10 12:58: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