summaryrefslogtreecommitdiff
path: root/qpid/cpp
diff options
context:
space:
mode:
authorCharles E. Rolke <chug@apache.org>2013-09-12 17:25:01 +0000
committerCharles E. Rolke <chug@apache.org>2013-09-12 17:25:01 +0000
commit61ae98c37b044b2c925216becb806c3ea29fd1fe (patch)
treefd35a0569a24aaa1e6db6d4f4f8ff2fcaf3e6cbf /qpid/cpp
parentbf746b5958b0107e66dabad39024f7ad933820ad (diff)
downloadqpid-python-61ae98c37b044b2c925216becb806c3ea29fd1fe.tar.gz
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 git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1522672 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp')
-rw-r--r--qpid/cpp/src/amqp.cmake23
1 files changed, 23 insertions, 0 deletions
diff --git a/qpid/cpp/src/amqp.cmake b/qpid/cpp/src/amqp.cmake
index e5a0444651..38b7d01315 100644
--- a/qpid/cpp/src/amqp.cmake
+++ b/qpid/cpp/src/amqp.cmake
@@ -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)