-
Notifications
You must be signed in to change notification settings - Fork 6.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ignition-cmake2/ignition-modularscripts/ignition-common3] Add options, support pkgconfig and fix usage for common3-graph #25021
[ignition-cmake2/ignition-modularscripts/ignition-common3] Add options, support pkgconfig and fix usage for common3-graph #25021
Conversation
Thank you for the fix |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First, we should wait for #25034 to merge which adds a standardized method for consuming GTS (pkg-config).
Then,
FindGTS.cmake
should be replaced/implemented via the pkgconfig mechanism aboveign_find_package
should probably be patched to makePRIVATE_FOR
not suppressfind_dependency
- We should not need a
vcpkg-cmake-wrapper
here. Any changes needed should be written into the-config.cmake
created by the port.
@ras0219-msft The official doc said:
This parameter only affects foreach(component ${ign_find_package_PRIVATE_FOR})
set(${component}_${PACKAGE_NAME}_PRIVATE true)
endforeach() foreach(component ${ign_find_package_REQUIRED_BY})
if(NOT ${component}_${PACKAGE_NAME}_PRIVATE)
ign_string_append(${component}_CMAKE_DEPENDENCIES "${${PACKAGE_NAME}_find_dependency}" DELIM "\n")
endif()
endforeach() if(${component}_${PACKAGE_NAME}_PRIVATE)
# If this is a private library or module, use the _PRIVATE suffix
set(${component}_${PACKAGE_NAME}_PKGCONFIG_TYPE ${component}_${${PACKAGE_NAME}_PKGCONFIG_TYPE}_PRIVATE)
else()
# Otherwise, use the plain type
set(${component}_${PACKAGE_NAME}_PKGCONFIG_TYPE ${component}_${${PACKAGE_NAME}_PKGCONFIG_TYPE})
endif() if(${component}_${PACKAGE_NAME}_PRIVATE)
# If this is a private library or module, use the _PRIVATE suffix
set(${component}_${PACKAGE_NAME}_PKGCONFIG_TYPE ${component}_${${PACKAGE_NAME}_PKGCONFIG_TYPE}_PRIVATE)
else()
# Otherwise, use the plain type
set(${component}_${PACKAGE_NAME}_PKGCONFIG_TYPE ${component}_${${PACKAGE_NAME}_PKGCONFIG_TYPE})
endif()
# Append the entry as a string onto the component-specific variable
# for whichever required type we selected
ign_string_append(${${component}_${PACKAGE_NAME}_PKGCONFIG_TYPE} ${${PACKAGE_NAME}_PKGCONFIG_ENTRY}) @component_cmake_dependencies@ In fact, the configuration of cmake should be the same as that of pkgconfig. So I think "make PRIVATE_FOR not suppress find_dependency" is consistent with the modification (current modification) of directly removing |
I cannot test it now but I disagree. I expect that your current modification changes the link type from |
…jack/fix-ignition-comm3-graph-usage
Already tested usage on x64-linux. |
Fix usage when using
find_package(ignition-common3-graphics CONFIG REQUIRED)
:Related: #24969
Already tested this usage in x64-linux.