You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by mc...@apache.org on 2014/10/09 20:08:18 UTC

svn commit: r1630545 - in /qpid/proton/trunk: proton-c/bindings/CMakeLists.txt tools/cmake/Modules/FindPerlLibs.cmake tools/cmake/Modules/ProtonFindPerl.cmake

Author: mcpierce
Date: Thu Oct  9 18:08:18 2014
New Revision: 1630545

URL: http://svn.apache.org/r1630545
Log:
PROTON-465: Make FindPerlLibs work properly without Perl devel files

First, fixed the build environment to only use the Proton Perl CMake
module when the standard fails.

Second, fixed the Proton CMake module to spout an info message that the
Perl bindings won't be built when the development files aren't found.

Added:
    qpid/proton/trunk/tools/cmake/Modules/ProtonFindPerl.cmake
      - copied, changed from r1629675, qpid/proton/trunk/tools/cmake/Modules/FindPerlLibs.cmake
Removed:
    qpid/proton/trunk/tools/cmake/Modules/FindPerlLibs.cmake
Modified:
    qpid/proton/trunk/proton-c/bindings/CMakeLists.txt

Modified: qpid/proton/trunk/proton-c/bindings/CMakeLists.txt
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/proton-c/bindings/CMakeLists.txt?rev=1630545&r1=1630544&r2=1630545&view=diff
==============================================================================
--- qpid/proton/trunk/proton-c/bindings/CMakeLists.txt (original)
+++ qpid/proton/trunk/proton-c/bindings/CMakeLists.txt Thu Oct  9 18:08:18 2014
@@ -82,8 +82,7 @@ endif (PHP_CONFIG_EXE)
 mark_as_advanced (PHP_CONFIG_EXE)
 
 # Prerequisites for Perl:
-include(FindPerl)
-include(FindPerlLibs)
+include(ProtonFindPerl)
 if (PERLLIBS_FOUND)
   set (DEFAULT_PERL ON)
 endif (PERLLIBS_FOUND)

Copied: qpid/proton/trunk/tools/cmake/Modules/ProtonFindPerl.cmake (from r1629675, qpid/proton/trunk/tools/cmake/Modules/FindPerlLibs.cmake)
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/tools/cmake/Modules/ProtonFindPerl.cmake?p2=qpid/proton/trunk/tools/cmake/Modules/ProtonFindPerl.cmake&p1=qpid/proton/trunk/tools/cmake/Modules/FindPerlLibs.cmake&r1=1629675&r2=1630545&rev=1630545&view=diff
==============================================================================
--- qpid/proton/trunk/tools/cmake/Modules/FindPerlLibs.cmake (original)
+++ qpid/proton/trunk/tools/cmake/Modules/ProtonFindPerl.cmake Thu Oct  9 18:08:18 2014
@@ -4,6 +4,9 @@
 
 # include(${CMAKE_CURRENT_LIST_DIR}/FindPerlLibs.cmake)
 
+include(FindPerl)
+include(FindPerlLibs)
+
 if(NOT PERLLIBS_FOUND)
   MESSAGE ( STATUS "Trying alternative search for Perl" )
 
@@ -25,6 +28,11 @@ if(NOT PERLLIBS_FOUND)
 
   IF ( NOT PERL_RETURN_VALUE )
     FIND_PATH ( PERL_INCLUDE_PATH perl.h ${PERL_OUTPUT}/CORE )
+
+    IF (PERL_INCLUDE_PATH MATCHES .*-NOTFOUND OR NOT PERL_INCLUDE_PATH)
+        MESSAGE(STATUS "Could not find perl.h")
+    ENDIF ()
+
   ENDIF ( NOT PERL_RETURN_VALUE )
 
   # if either the library path is not found not set at all
@@ -61,13 +69,13 @@ if(NOT PERLLIBS_FOUND)
       ENDIF ( NOT PERL_RETURN_VALUE )
   ENDIF ( PERL_LIBRARY MATCHES .*-NOTFOUND OR NOT PERL_LIBRARY )
 
-  IF ( PERL_LIBRARY )
-    MESSAGE ( STATUS "Found PerlLibs: ${PERL_LIBRARY}" )
+  IF(PERL_LIBRARY MATCHES .*-NOTFOUND OR NOT PERL_LIBRARY OR
+     PERL_INCLUDE_PATH MATCHES .*-NOTFOUND OR NOT PERL_INCLUDE_PATH)
+    MESSAGE (STATUS "No Perl devel environment found - skipping Perl bindings")
+    SET (DEFAULT_PERL OFF)
   ELSE()
-    MESSAGE ( STATUS "PerlLibs Not Found" )
-  ENDIF ( PERL_LIBRARY )
+    MESSAGE ( STATUS "Found PerlLibs: ${PERL_LIBRARY}" )
+    SET (DEFAULT_PERL ON)
+  ENDIF()
 
-  if (PERL_LIBRARY)
-    set (DEFAULT_PERL ON)
-  endif (PERL_LIBRARY)
 endif(NOT PERLLIBS_FOUND)



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org