jiridanek commented on code in PR #371:
URL: https://github.com/apache/qpid-proton/pull/371#discussion_r875968899
##########
c/src/ProtonConfig.cmake.in:
##########
@@ -52,26 +52,38 @@ if (Proton_USE_STATIC_LIBS)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH_OLD})
endif()
-set (Proton_INCLUDE_DIRS @PACKAGE_INCLUDE_INSTALL_DIR@)
+set_and_check (Proton_INCLUDE_DIRS @PACKAGE_INCLUDE_INSTALL_DIR@)
set (Proton_LIBRARIES Proton::qpid-proton)
set (Proton_FOUND True)
-set (Proton_Core_INCLUDE_DIRS @PACKAGE_INCLUDE_INSTALL_DIR@)
+set_and_check (Proton_Core_INCLUDE_DIRS @PACKAGE_INCLUDE_INSTALL_DIR@)
set (Proton_Core_LIBRARIES Proton::core)
set (Proton_Core_FOUND True)
set (HAS_PROACTOR @HAS_PROACTOR@)
if (HAS_PROACTOR)
- set (Proton_Proactor_INCLUDE_DIRS @PACKAGE_INCLUDE_INSTALL_DIR@)
+ set_and_check (Proton_Proactor_INCLUDE_DIRS @PACKAGE_INCLUDE_INSTALL_DIR@)
set (Proton_Proactor_LIBRARIES Proton::proactor)
set (Proton_Proactor_FOUND True)
endif()
set (HAS_TLS @HAS_TLS@)
if (HAS_TLS)
- set (Proton_Tls_INCLUDE_DIRS @PACKAGE_INCLUDE_INSTALL_DIR@)
+ set_and_check (Proton_Tls_INCLUDE_DIRS @PACKAGE_INCLUDE_INSTALL_DIR@)
set (Proton_Tls_LIBRARIES Proton::tls)
set (Proton_Tls_FOUND True)
endif()
-check_required_components(Proton)
+macro(pn_check_required_components _NAME)
+ check_required_components(${_NAME})
+
+ if (NOT ${_NAME}_FIND_QUIETLY)
+ foreach(comp ${${_NAME}_FIND_COMPONENTS})
+ if(NOT ${_NAME}_${comp}_FOUND)
+ MESSAGE(STATUS "Requested ${_NAME} component ${comp} is NOT FOUND")
+ endif()
+ endforeach()
+ endif()
+endmacro()
Review Comment:
ok, in that case I can turn comment into function, because then i can do
return() instead of the deeply nested things inside the top level if
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]