From 61ae98c37b044b2c925216becb806c3ea29fd1fe Mon Sep 17 00:00:00 2001 From: "Charles E. Rolke" Date: Thu, 12 Sep 2013 17:25:01 +0000 Subject: 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 --- qpid/cpp/src/amqp.cmake | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'qpid/cpp') 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) -- cgit v1.2.1