jiridanek commented on a change in pull request #312: URL: https://github.com/apache/qpid-proton/pull/312#discussion_r632145705
########## File path: c/src/ProtonConfig.cmake.in ########## @@ -22,50 +22,56 @@ # Version: @PN_VERSION@ # URL: http://qpid.apache.org/proton/ -set (Proton_VERSION @PN_VERSION@) +@PACKAGE_INIT@ +include("${CMAKE_CURRENT_LIST_DIR}/ProtonTargets.cmake") -set (Proton_INCLUDE_DIRS @INCLUDEDIR@) -set (Proton_LIBRARIES optimized @LIBDIR@/@PROTONLIB@ debug @LIBDIR@/@PROTONLIBDEBUG@) -set (Proton_FOUND True) +set(Proton_VERSION @PN_VERSION@) + +# find dependencies, because static libs don't transitively pull them +if (Proton_USE_STATIC_LIBS) + set(CMAKE_MODULE_PATH_OLD ${CMAKE_MODULE_PATH}) + set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}") + + set(CyrusSASL_FOUND @CyrusSASL_FOUND@) + if (CyrusSASL_FOUND) + find_package (CyrusSASL REQUIRED) + endif() + + set(OpenSSL_FOUND @OpenSSL_FOUND@) + if (OpenSSL_FOUND) + find_package (OpenSSL REQUIRED) + endif() -set (Proton_Core_INCLUDE_DIRS @INCLUDEDIR@) -set (Proton_Core_LIBRARIES optimized @LIBDIR@/@PROTONCORELIB@ debug @LIBDIR@/@PROTONCORELIBDEBUG@) + set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH_OLD}) +endif() -# Add modular target in a way compatible with cmake 2.8.12 -if (NOT TARGET Proton::core) - add_library(Proton::core UNKNOWN IMPORTED) - set_target_properties(Proton::core - PROPERTIES - IMPORTED_LOCATION "@LIBDIR@/@PROTONCORELIB@" - IMPORTED_LOCATION_DEBUG "@LIBDIR@/@PROTONCORELIBDEBUG@" - INTERFACE_INCLUDE_DIRECTORIES "${Proton_Core_INCLUDE_DIRS}") +set(Proton_INCLUDE_DIRS @INCLUDEDIR@) Review comment: there is probably some newfangled way to handle the include headers too and keep them associated with the targets... -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
