mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-12 16:39:02 +08:00
fd675b7b81
* [cld3] new port * [cld3] fix port version * update a path to the license * use vcpkg_install_cmake * remove deprecated functions * disable arm test * update sha * ci.baseline.txt * Update scripts/ci.baseline.txt Co-authored-by: Lily Wang <94091114+LilyWangLL@users.noreply.github.com> * Update ports/cld3/vcpkg.json Co-authored-by: Lily Wang <94091114+LilyWangLL@users.noreply.github.com> * Update ports/cld3/portfile.cmake Co-authored-by: Lily Wang <94091114+LilyWangLL@users.noreply.github.com> * fix version * scripts/ci.baseline.txt * update patch * c++ 11 version * disable 64-osx * more patches * fix linux/Win32 static only * anable other platforms * fix build * x64-osx * ci.baseline.txt * Revert "ci.baseline.txt" This reverts commit ade1499c0f70c5171759c5330f0b8ba7394b3438. * Update ports/cld3/portfile.cmake Co-authored-by: Lily Wang <94091114+LilyWangLL@users.noreply.github.com> * fix version * remove unused vcpkg-cmake-config * move install headers to portfile * remove ABI version * add LF to ci.baseline.txt * scripts/ci.baseline.txt * disable unit tests * fix * move COMPILER_MSVC to port file * fix version * add line break * refactoring * uncomment -D_GLIBCXX_USE_CXX11_ABI=0 * add cld3Config.cmake.in * improve cld3Config.cmake.in --------- Co-authored-by: Alexander ROZDAYBEDA <alexander.rozdaybeda@avanquest.com> Co-authored-by: Lily Wang <94091114+LilyWangLL@users.noreply.github.com>
40 lines
1.1 KiB
CMake
40 lines
1.1 KiB
CMake
if(TARGET cld3)
|
|
return()
|
|
endif()
|
|
|
|
include(CMakeFindDependencyMacro)
|
|
find_dependency(Protobuf)
|
|
|
|
# Traditional find module variables (vcpkg polyfill)
|
|
set(cld3_INCLUDE_DIR "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include")
|
|
set(cld3_INCLUDE_DIRS "${cld3_INCLUDE_DIR}")
|
|
set(cld3_DIR "${cld3_INCLUDE_DIR}")
|
|
|
|
get_filename_component(_cld3_root "${CMAKE_CURRENT_LIST_FILE}" PATH)
|
|
get_filename_component(_cld3_root "${_cld3_root}" PATH)
|
|
get_filename_component(_cld3_root "${_cld3_root}" PATH)
|
|
|
|
find_library(_cld_lib NAMES cld3)
|
|
if (EXISTS "${_cld_lib}")
|
|
|
|
add_library(cld3 INTERFACE IMPORTED GLOBAL)
|
|
add_library(cld3::cld3 ALIAS cld3)
|
|
|
|
target_include_directories(cld3 INTERFACE ${_cld3_root}/include)
|
|
|
|
set(cld3_LIBRARIES "${_cld_lib}")
|
|
target_link_libraries(cld3 INTERFACE ${cld3_LIBRARIES})
|
|
target_link_libraries(cld3 INTERFACE ${Protobuf_LITE_LIBRARIES})
|
|
|
|
set_property(TARGET cld3 APPEND PROPERTY IMPORTED_CONFIGURATIONS)
|
|
set(cld3_FOUND TRUE)
|
|
|
|
else()
|
|
|
|
set(cld3_FOUND FALSE)
|
|
|
|
endif()
|
|
|
|
unset(_cld_lib)
|
|
unset(_cld3_root)
|