Author: chug
Date: Thu Sep 12 17:25:01 2013
New Revision: 1522672

URL: http://svn.apache.org/r1522672
Log:
QPID-5103: Support for finding an installed proton that works on windows
Use in conjunction with commit associated with PROTON-413.
1. In proton: cmake -DCMAKE_INSTALL_PREFIX=P:/install ...
2.            devenv proton.sln /build "Debug|Win32" /project INSTALL
3. In qpid:   cmake -DPROTON_ROOT=P:/install ...
4.            devenv qpid-cpp.sln /build "Debug|Win32 /project INSTALL

Modified:
    qpid/trunk/qpid/cpp/src/amqp.cmake

Modified: qpid/trunk/qpid/cpp/src/amqp.cmake
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/amqp.cmake?rev=1522672&r1=1522671&r2=1522672&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/amqp.cmake (original)
+++ qpid/trunk/qpid/cpp/src/amqp.cmake Thu Sep 12 17:25:01 2013
@@ -23,6 +23,29 @@ include(FindPkgConfig)
 
 pkg_check_modules(PROTON libqpid-proton)
 
+if (NOT PROTON_FOUND)
+    # if pkg-config is absent or fails to find proton then use
+    # PROTON_ROOT command line option or environment variable to locate
+    # local installed proton build.
+    if (NOT PROTON_ROOT)
+        set (PROTON_ROOT "$ENV{PROTON_ROOT}")
+    endif()
+    if (PROTON_ROOT)
+        find_package(proton PATHS ${PROTON_ROOT} NO_DEFAULT_PATH)
+
+        if (proton_FOUND EQUAL 1)
+            set(iFile "${PROTON_ROOT}/lib/proton.cmake/libqpid-proton.cmake")
+            if(EXISTS ${iFile})
+                include("${iFile}")
+            else()
+                message(FATAL_ERROR "PROTON_ROOT defined but file ${iFile} is 
missing")
+            endif()
+        else()
+            message(FATAL_ERROR "Proton package files not found in 
${PROTON_ROOT}")
+        endif()
+    endif()
+endif()
+
 set (amqp_default ${amqp_force})
 set (minimum_version 0.5)
 set (maximum_version 0.5)



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to