Make it so find/build targets are the same in exported CMake build. Previously, the build targets were named e.g. int2 and cxx whereas the installed targets were namespaced Libint2::. This PR allow for the following
cmake_minimum_required( VERSION 3.17 FATAL_ERROR )
project( libint2-as-subproject LANGUAGES CXX )
find_package( Libint2 )
if( NOT Libint2_FOUND )
include( FetchContent )
FetchContent_Declare( libint2
URL https://.......
)
FetchContent_MakeAvailable( libint2 )
endif()
add_executable( my_exe test.cxx )
target_link_libraries( my_exe PUBLIC Libint2::int2 )
Make it so find/build targets are the same in exported CMake build. Previously, the build targets were named e.g.
int2
andcxx
whereas the installed targets were namespacedLibint2::
. This PR allow for the following