vcpkg/ports/gflags/vcpkg-cmake-wrapper.cmake
Jafar Abdi b7aa438291
[gflags]: Fix targets gflags::* not being globally visible (#20011)
* [gflags]: Fix targets gflags::* not globally visible

* Add the target as interface

* vcpkg x-add-version --all

Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
2021-09-16 16:20:26 -07:00

11 lines
315 B
CMake

set(GFLAGS_USE_TARGET_NAMESPACE ON)
_find_package(${ARGS})
foreach(tgt gflags gflags_shared gflags_static)
if (NOT TARGET ${tgt} AND TARGET "gflags::${tgt}")
add_library(${tgt} INTERFACE IMPORTED)
target_link_libraries(${tgt} INTERFACE "gflags::${tgt}")
endif()
endforeach(tgt)