mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-20 01:27:48 +08:00
3eeaf564d1
* [libgeotiff] fix compile on linux Fix cmake libtiff functions detetion failure caused by finding no functions in libm. Signed-off-by: Hiroshi Miura <miurahr@linux.com> * [libgeotiff] fix utility binary handling in linux Signed-off-by: Hiroshi Miura <miurahr@linux.com> * [tiff] Fix static transitive dependencies * [libgeotiff] Fix .dll and .exe manipulation * [leptonica] Find dependencies in installed cmake config file * [tiff] Do not add cmake targets to TIFF_LIBRARIES * [tiff] Link consumers against m on unix platforms
38 lines
1.2 KiB
CMake
38 lines
1.2 KiB
CMake
include(vcpkg_common_functions)
|
|
|
|
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO DanBloomberg/leptonica
|
|
REF 1.74.4
|
|
SHA512 3b9d0be937883f733f72cbdf0b624ec245d9256a8b4622997f437d309efd7ad9695ad1cbe2224d543eb3ef8c44833567b3cc9a95e9a774ef9046b7acaf0ae744
|
|
HEAD_REF master
|
|
PATCHES
|
|
${CMAKE_CURRENT_LIST_DIR}/fix-cmakelists.patch
|
|
${CMAKE_CURRENT_LIST_DIR}/use-tiff-libraries.patch
|
|
${CMAKE_CURRENT_LIST_DIR}/find-dependency.patch
|
|
)
|
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" STATIC)
|
|
|
|
vcpkg_configure_cmake(
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
PREFER_NINJA
|
|
OPTIONS
|
|
-DSTATIC=${STATIC}
|
|
-DCMAKE_REQUIRED_INCLUDES=${CURRENT_INSTALLED_DIR}/include # for check_include_file()
|
|
)
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
vcpkg_fixup_cmake_targets(CONFIG_PATH "cmake")
|
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig)
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig)
|
|
|
|
# Handle copyright
|
|
file(COPY ${SOURCE_PATH}/leptonica-license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/leptonica)
|
|
file(RENAME ${CURRENT_PACKAGES_DIR}/share/leptonica/leptonica-license.txt ${CURRENT_PACKAGES_DIR}/share/leptonica/copyright)
|