vcpkg/ports/protobuf/vcpkg-cmake-wrapper.cmake
Phoebe bd2932aab9
[protobuf] Add vcpkg-cmake-wrapper.cmake (#13659)
* [opencv] Fix dependency port protobuf

* Add vcpkg-cmake-wrapper.cmake for protobuf

* Remove blank line

* Set the cmake_policy
2020-09-27 17:36:08 -07:00

14 lines
424 B
CMake

if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.3)
cmake_policy(PUSH)
cmake_policy(SET CMP0057 NEW)
if(NOT "CONFIG" IN_LIST ARGS AND NOT "NO_MODULE" IN_LIST ARGS)
if("@VCPKG_LIBRARY_LINKAGE@" STREQUAL "static")
set(Protobuf_USE_STATIC_LIBS ON)
else()
set(Protobuf_USE_STATIC_LIBS OFF)
endif()
endif()
cmake_policy(POP)
endif()
_find_package(${ARGS})