diff options
| author | Robert Schumacher <roschuma@microsoft.com> | 2017-11-15 21:58:26 -0800 |
|---|---|---|
| committer | Robert Schumacher <roschuma@microsoft.com> | 2017-11-15 21:58:26 -0800 |
| commit | 7e3dcc4f096925f152593e3c8cd33e5dbf0b4e6f (patch) | |
| tree | 6a0018b84c3f19c53f07d725c5750daaf22ddf7c | |
| parent | 4228e1e389f31b70eb7078aed99b21ad465d8aa0 (diff) | |
| download | vcpkg-7e3dcc4f096925f152593e3c8cd33e5dbf0b4e6f.tar.gz vcpkg-7e3dcc4f096925f152593e3c8cd33e5dbf0b4e6f.zip | |
[tesseract] Fix static linking. [icu][tiff] Add patches in toolchain to fix static linking.
| -rw-r--r-- | ports/tesseract/CONTROL | 2 | ||||
| -rw-r--r-- | ports/tesseract/portfile.cmake | 3 | ||||
| -rw-r--r-- | scripts/buildsystems/vcpkg.cmake | 20 |
3 files changed, 20 insertions, 5 deletions
diff --git a/ports/tesseract/CONTROL b/ports/tesseract/CONTROL index 8aee14808..6e0b0428d 100644 --- a/ports/tesseract/CONTROL +++ b/ports/tesseract/CONTROL @@ -1,4 +1,4 @@ Source: tesseract -Version: 3.05.01-1 +Version: 3.05.01-2 Description: An OCR Engine that was developed at HP Labs between 1985 and 1995... and now at Google. Build-Depends: leptonica, icu diff --git a/ports/tesseract/portfile.cmake b/ports/tesseract/portfile.cmake index 31ed2cd1f..5c37f51b3 100644 --- a/ports/tesseract/portfile.cmake +++ b/ports/tesseract/portfile.cmake @@ -19,6 +19,9 @@ vcpkg_apply_patches( ${CMAKE_CURRENT_LIST_DIR}/use-vcpkg-icu.patch ) +# The built-in cmake FindICU is better +file(REMOVE ${SOURCE_PATH}/cmake/FindICU.cmake) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA 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() |
