From 7e3dcc4f096925f152593e3c8cd33e5dbf0b4e6f Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 15 Nov 2017 21:58:26 -0800 Subject: [tesseract] Fix static linking. [icu][tiff] Add patches in toolchain to fix static linking. --- scripts/buildsystems/vcpkg.cmake | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'scripts') diff --git a/scripts/buildsystems/vcpkg.cmake b/scripts/buildsystems/vcpkg.cmake index 66dd50169..ff89439cc 100644 --- a/scripts/buildsystems/vcpkg.cmake +++ b/scripts/buildsystems/vcpkg.cmake @@ -157,10 +157,20 @@ macro(find_package name) unset(Boost_USE_STATIC_LIBS) unset(Boost_USE_MULTITHREADED) unset(Boost_USE_STATIC_RUNTIME) - endif() - _find_package(${ARGV}) - - if("${name}" STREQUAL "TIFF") + _find_package(${ARGV}) + elseif("${name}" STREQUAL "ICU") + function(_vcpkg_find_in_list) + list(FIND ARGV "COMPONENTS" COMPONENTS_IDX) + set(COMPONENTS_IDX ${COMPONENTS_IDX} PARENT_SCOPE) + endfunction() + _vcpkg_find_in_list(${ARGV}) + if(NOT COMPONENTS_IDX EQUAL -1) + _find_package(${ARGV} COMPONENTS data) + else() + _find_package(${ARGV}) + endif() + elseif("${name}" STREQUAL "TIFF") + _find_package(${ARGV}) find_package(LibLZMA) if(TARGET TIFF::TIFF) set_property(TARGET TIFF::TIFF APPEND PROPERTY INTERFACE_LINK_LIBRARIES ${LIBLZMA_LIBRARIES}) @@ -168,6 +178,8 @@ macro(find_package name) if(TIFF_LIBRARIES) list(APPEND TIFF_LIBRARIES ${LIBLZMA_LIBRARIES}) endif() + else() + _find_package(${ARGV}) endif() endmacro() -- cgit v1.2.3