vcpkg/ports/nu-book-zxing-cpp/portfile.cmake

39 lines
1.1 KiB
CMake
Raw Normal View History

[nu-book-zxing-cpp] New port (#22657) * Upgraded zxing-cpp port to use the source code from https://github.com/nu-book/zxing-cpp * Removed outdated patch files * Added patch files to remove unnecessary install .pdb . Not needed cause lib is created using /Z7. Debug symbols are embedded in the .lib * Updated helper functions as per maintainers guidelines * Braces error * Added vcpkg-cmake-config and vcpkg-cmake as host dependencies * CHanged TARGET to PACKAGE_NAME * Ran format manifest * Ran x-add-version * Update vcpkg.json * Add git as host dependency cause of ExternalProject.cmake:2650 (message): error: could not find git for clone of fmtlib-populate. Fix version as per feedback * Removed git.. does not exist * Set build blackbox test and examples to default to OFF * Ran x-add-versions --all * Change source_path for uwp * Remove quotes * update SHA * Removed unused options when building for uwp * add version * Force type release for uwp * ran add version * Copy zxing.pc only if not UWP * version fix * Fix licence location if building uwp * ran x-add-version * remove NOT silly mistake * ran add version * Removed unnecessary change of source path to build winrt sdk. * Update version * Added flag and MS build option to vcpkg cmake configure * Add -wd4996 flag to ignore deprecated function warning in v142 VCPKG Build tools for WindowStore * add version * Use VCPKG_TARGET_IS_UWP instead of STREQUAL "WindwosStore" Co-authored-by: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com> * Added quotes as per review feedback * Fixed versioning as per feedback * Add licence to vcpkg.json * Update version * Removed unnecessary copy of template .pc.in file. CMake takes care of generating the correct .pc file and puts it in the right place. * Add versions * Using extra options to avoid two vcpkg configure * add version * Revert back to the original port * Add new package nu-book-zxing * Updated baseline with new port * Removed non-existence version * Add nu-book-zxing-cpp version * Put correct package name in vcpkg.json Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> * Update version and add skip to baseline * [nu-book-zxing-cpp][zxing-cpp] Remove abandoned port, promote nu-book fork * Add "supports": "!uwp" Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> * Update version database Co-authored-by: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com> Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
2022-02-15 08:37:35 +08:00
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_download_distfile(
STACK_PROTECTOR_FIX_PATCH
URLS https://github.com/zxing-cpp/zxing-cpp/commit/accced21bae23320aad47b295de1085ab4e561b5.patch
FILENAME accced21bae23320aad47b295de1085ab4e561b5.patch
SHA512 c787f7cd313d80fcaa39c171a59021453a98936a66b842b3d83389104c8398417eed42151b8f5649e339e83b7261e9caa3423d9fa7b47e1fd00c933d8b11447c
)
[nu-book-zxing-cpp] New port (#22657) * Upgraded zxing-cpp port to use the source code from https://github.com/nu-book/zxing-cpp * Removed outdated patch files * Added patch files to remove unnecessary install .pdb . Not needed cause lib is created using /Z7. Debug symbols are embedded in the .lib * Updated helper functions as per maintainers guidelines * Braces error * Added vcpkg-cmake-config and vcpkg-cmake as host dependencies * CHanged TARGET to PACKAGE_NAME * Ran format manifest * Ran x-add-version * Update vcpkg.json * Add git as host dependency cause of ExternalProject.cmake:2650 (message): error: could not find git for clone of fmtlib-populate. Fix version as per feedback * Removed git.. does not exist * Set build blackbox test and examples to default to OFF * Ran x-add-versions --all * Change source_path for uwp * Remove quotes * update SHA * Removed unused options when building for uwp * add version * Force type release for uwp * ran add version * Copy zxing.pc only if not UWP * version fix * Fix licence location if building uwp * ran x-add-version * remove NOT silly mistake * ran add version * Removed unnecessary change of source path to build winrt sdk. * Update version * Added flag and MS build option to vcpkg cmake configure * Add -wd4996 flag to ignore deprecated function warning in v142 VCPKG Build tools for WindowStore * add version * Use VCPKG_TARGET_IS_UWP instead of STREQUAL "WindwosStore" Co-authored-by: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com> * Added quotes as per review feedback * Fixed versioning as per feedback * Add licence to vcpkg.json * Update version * Removed unnecessary copy of template .pc.in file. CMake takes care of generating the correct .pc file and puts it in the right place. * Add versions * Using extra options to avoid two vcpkg configure * add version * Revert back to the original port * Add new package nu-book-zxing * Updated baseline with new port * Removed non-existence version * Add nu-book-zxing-cpp version * Put correct package name in vcpkg.json Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> * Update version and add skip to baseline * [nu-book-zxing-cpp][zxing-cpp] Remove abandoned port, promote nu-book fork * Add "supports": "!uwp" Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> * Update version database Co-authored-by: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com> Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
2022-02-15 08:37:35 +08:00
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO zxing-cpp/zxing-cpp
REF v2.0.0
SHA512 fa22164f834a42194eafd0d3e9c09d953233c69843ac6e79c8d6513314be28d8082382b436c379368e687e0eed05cb5e566d2893ec6eb29233a36643904ae083
[nu-book-zxing-cpp] New port (#22657) * Upgraded zxing-cpp port to use the source code from https://github.com/nu-book/zxing-cpp * Removed outdated patch files * Added patch files to remove unnecessary install .pdb . Not needed cause lib is created using /Z7. Debug symbols are embedded in the .lib * Updated helper functions as per maintainers guidelines * Braces error * Added vcpkg-cmake-config and vcpkg-cmake as host dependencies * CHanged TARGET to PACKAGE_NAME * Ran format manifest * Ran x-add-version * Update vcpkg.json * Add git as host dependency cause of ExternalProject.cmake:2650 (message): error: could not find git for clone of fmtlib-populate. Fix version as per feedback * Removed git.. does not exist * Set build blackbox test and examples to default to OFF * Ran x-add-versions --all * Change source_path for uwp * Remove quotes * update SHA * Removed unused options when building for uwp * add version * Force type release for uwp * ran add version * Copy zxing.pc only if not UWP * version fix * Fix licence location if building uwp * ran x-add-version * remove NOT silly mistake * ran add version * Removed unnecessary change of source path to build winrt sdk. * Update version * Added flag and MS build option to vcpkg cmake configure * Add -wd4996 flag to ignore deprecated function warning in v142 VCPKG Build tools for WindowStore * add version * Use VCPKG_TARGET_IS_UWP instead of STREQUAL "WindwosStore" Co-authored-by: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com> * Added quotes as per review feedback * Fixed versioning as per feedback * Add licence to vcpkg.json * Update version * Removed unnecessary copy of template .pc.in file. CMake takes care of generating the correct .pc file and puts it in the right place. * Add versions * Using extra options to avoid two vcpkg configure * add version * Revert back to the original port * Add new package nu-book-zxing * Updated baseline with new port * Removed non-existence version * Add nu-book-zxing-cpp version * Put correct package name in vcpkg.json Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> * Update version and add skip to baseline * [nu-book-zxing-cpp][zxing-cpp] Remove abandoned port, promote nu-book fork * Add "supports": "!uwp" Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> * Update version database Co-authored-by: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com> Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
2022-02-15 08:37:35 +08:00
HEAD_REF master
PATCHES
"${STACK_PROTECTOR_FIX_PATCH}"
[nu-book-zxing-cpp] New port (#22657) * Upgraded zxing-cpp port to use the source code from https://github.com/nu-book/zxing-cpp * Removed outdated patch files * Added patch files to remove unnecessary install .pdb . Not needed cause lib is created using /Z7. Debug symbols are embedded in the .lib * Updated helper functions as per maintainers guidelines * Braces error * Added vcpkg-cmake-config and vcpkg-cmake as host dependencies * CHanged TARGET to PACKAGE_NAME * Ran format manifest * Ran x-add-version * Update vcpkg.json * Add git as host dependency cause of ExternalProject.cmake:2650 (message): error: could not find git for clone of fmtlib-populate. Fix version as per feedback * Removed git.. does not exist * Set build blackbox test and examples to default to OFF * Ran x-add-versions --all * Change source_path for uwp * Remove quotes * update SHA * Removed unused options when building for uwp * add version * Force type release for uwp * ran add version * Copy zxing.pc only if not UWP * version fix * Fix licence location if building uwp * ran x-add-version * remove NOT silly mistake * ran add version * Removed unnecessary change of source path to build winrt sdk. * Update version * Added flag and MS build option to vcpkg cmake configure * Add -wd4996 flag to ignore deprecated function warning in v142 VCPKG Build tools for WindowStore * add version * Use VCPKG_TARGET_IS_UWP instead of STREQUAL "WindwosStore" Co-authored-by: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com> * Added quotes as per review feedback * Fixed versioning as per feedback * Add licence to vcpkg.json * Update version * Removed unnecessary copy of template .pc.in file. CMake takes care of generating the correct .pc file and puts it in the right place. * Add versions * Using extra options to avoid two vcpkg configure * add version * Revert back to the original port * Add new package nu-book-zxing * Updated baseline with new port * Removed non-existence version * Add nu-book-zxing-cpp version * Put correct package name in vcpkg.json Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> * Update version and add skip to baseline * [nu-book-zxing-cpp][zxing-cpp] Remove abandoned port, promote nu-book fork * Add "supports": "!uwp" Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> * Update version database Co-authored-by: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com> Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
2022-02-15 08:37:35 +08:00
)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DBUILD_BLACKBOX_TESTS=OFF
-DBUILD_EXAMPLES=OFF
)
vcpkg_cmake_install()
vcpkg_fixup_pkgconfig()
vcpkg_copy_pdbs()
vcpkg_cmake_config_fixup(
CONFIG_PATH lib/cmake/ZXing
PACKAGE_NAME ZXing
)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/nu-book-zxing-cpp" RENAME copyright)