gz-cmake
gz-cmake copied to clipboard
Find one of multiple packages
Original report (archived issue) by Shane Loretz (Bitbucket: Shane Loretz, GitHub: sloretz).
Proposal
# find ignition-math3, or ignition-math4
# copy all variables prefixed with the found project name into variables prefixed with ${OUTPUT_VAR}
ign_find_package(
OUTPUT_VAR
some-math-version
ONE_OF
ignition-math4
ignition-math3
REQUIRED)
# ...
target_link_libraries(my_lib ${some-math-version_LIBRARIES})
Developing on the default branch of ignition projects has one minor annoyance that occurs fairly frequently. The major version being bumped on one branch breaks the build of every downstream project. If the upstream project doesn't have a release then downstream must choose between everything-from-source builds being broken, or CI being broken. To get around this some projects have been finding either ignition-math3 or ignition-math4.