summaryrefslogtreecommitdiff
path: root/cpp/src
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
commitafb0d8e31db351cb447a8ef5692bd5a390451259 (patch)
tree44114a831509a1da6d605df0582022945f9418d3 /cpp/src
parent7218243dd4d038ac58efce854af8228fd286eadc (diff)
downloadqpid-python-afb0d8e31db351cb447a8ef5692bd5a390451259.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/qpid@1522672 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/amqp.cmake23
1 files changed, 23 insertions, 0 deletions
diff --git a/cpp/src/amqp.cmake b/cpp/src/amqp.cmake
index e5a0444651..38b7d01315 100644
--- a/cpp/src/amqp.cmake
+++ b/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)