diff options
| -rw-r--r-- | ports/piex/CMakeLists.txt | 43 | ||||
| -rw-r--r-- | ports/piex/CONTROL | 3 | ||||
| -rw-r--r-- | ports/piex/portfile.cmake | 28 |
3 files changed, 74 insertions, 0 deletions
diff --git a/ports/piex/CMakeLists.txt b/ports/piex/CMakeLists.txt new file mode 100644 index 000000000..35a881055 --- /dev/null +++ b/ports/piex/CMakeLists.txt @@ -0,0 +1,43 @@ +cmake_minimum_required(VERSION 3.8.0) +project(piex) + +if(MSVC) + add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS) +endif() + +include_directories(".") + +add_library(binary_parse + src/binary_parse/cached_paged_byte_array.cc + src/binary_parse/range_checked_byte_ptr.cc +) + +add_library(image_type_recognition + src/image_type_recognition/image_type_recognition_lite.cc +) + +target_link_libraries(image_type_recognition binary_parse) + +add_library(tiff_directory + src/tiff_directory/tiff_directory.cc +) + +target_link_libraries(tiff_directory binary_parse) + +add_library(piex + src/piex.cc + src/tiff_parser.cc +) + +target_link_libraries(piex tiff_directory image_type_recognition binary_parse) + +install( + TARGETS piex + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(NOT DISABLE_INSTALL_HEADERS) + install(FILES src/piex.h src/piex_types.h DESTINATION include/src) +endif() diff --git a/ports/piex/CONTROL b/ports/piex/CONTROL new file mode 100644 index 000000000..187f253ef --- /dev/null +++ b/ports/piex/CONTROL @@ -0,0 +1,3 @@ +Source: piex +Version: 2017-09-01-473434f2dd974978b +Description: The Preview Image Extractor (PIEX) is designed to find and extract the largest diff --git a/ports/piex/portfile.cmake b/ports/piex/portfile.cmake new file mode 100644 index 000000000..2c99ad1c7 --- /dev/null +++ b/ports/piex/portfile.cmake @@ -0,0 +1,28 @@ +include(vcpkg_common_functions) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + message(WARNING "Dynamic not supported building static") + set(VCPKG_LIBRARY_LINKAGE static) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO google/piex + REF 473434f2dd974978b329faf5c87ae8aa09a2714d + SHA512 cb4a4107eb5e880673accac0f19965f3318e5e4c2fc24724afef5d15eab40d5866e17eb1a23af3b06b729d0e898ed99a6407d1f3000e94e3bbd71e1952d19627 + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG + -DDISABLE_INSTALL_HEADERS=ON +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/piex RENAME copyright) |
