Now if you find_package(libhandlegraph), and the CMAKE_INSTALL_PREFIX that libhandlegraph installed into is in your CMAKE_PREFIX_PATH, you will see libhandlegraph::handlegraph_static and libhandlegraph::handlegraph_shared targets, and $libhandlegraph_FOUND will be true.
If you want to fall back to a bundled libhandlegraph, you can poll that variable and, if it isn't set, add libhandlegraph as a subdirectory and alias is targets into the namespace, and then you can just use the namespaced targets for the rest of the build.
Now if you
find_package(libhandlegraph)
, and theCMAKE_INSTALL_PREFIX
that libhandlegraph installed into is in yourCMAKE_PREFIX_PATH
, you will seelibhandlegraph::handlegraph_static
andlibhandlegraph::handlegraph_shared
targets, and$libhandlegraph_FOUND
will be true.If you want to fall back to a bundled libhandlegraph, you can poll that variable and, if it isn't set, add libhandlegraph as a subdirectory and alias is targets into the namespace, and then you can just use the namespaced targets for the rest of the build.