diff options
| author | LazyHamster <ariman@inbox.ru> | 2018-02-01 18:06:54 +0300 |
|---|---|---|
| committer | LazyHamster <ariman@inbox.ru> | 2018-02-01 18:06:54 +0300 |
| commit | d2c1aaddc8b953e28b8fd4a0c17c4982469b290c (patch) | |
| tree | 71999a2e5298097a56e9edd6016b812e75aaa6c0 | |
| parent | 1d8137d51390f866dc05b9071f664ce49e65d9ca (diff) | |
| download | vcpkg-d2c1aaddc8b953e28b8fd4a0c17c4982469b290c.tar.gz vcpkg-d2c1aaddc8b953e28b8fd4a0c17c4982469b290c.zip | |
Fixed build & install. Added mux library.
| -rw-r--r-- | ports/libwebp/CONTROL | 2 | ||||
| -rw-r--r-- | ports/libwebp/build_fixes.patch | 33 | ||||
| -rw-r--r-- | ports/libwebp/portfile.cmake | 15 |
3 files changed, 44 insertions, 6 deletions
diff --git a/ports/libwebp/CONTROL b/ports/libwebp/CONTROL index 0e63f5b39..42201b36b 100644 --- a/ports/libwebp/CONTROL +++ b/ports/libwebp/CONTROL @@ -1,3 +1,3 @@ Source: libwebp -Version: 0.6.1 +Version: 0.6.1-1 Description: Lossy compression of digital photographic images. diff --git a/ports/libwebp/build_fixes.patch b/ports/libwebp/build_fixes.patch new file mode 100644 index 000000000..72cb304a9 --- /dev/null +++ b/ports/libwebp/build_fixes.patch @@ -0,0 +1,33 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 3b105e37..f9b806c4 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -106,6 +106,9 @@ endforeach() + if(MSVC) + # avoid security warnings for e.g., fopen() used in the examples. + add_definitions(-D_CRT_SECURE_NO_WARNINGS) ++ if(BUILD_SHARED_LIBS) ++ add_definitions(-DWEBP_EXTERN=__declspec\(dllexport\)) ++ endif() + else() + add_definitions(-Wall) + endif() +@@ -235,6 +238,10 @@ if(WEBP_BUILD_GIF2WEBP AND NOT GIF_FOUND) + endif() + + if(WEBP_BUILD_GIF2WEBP OR WEBP_BUILD_IMG2WEBP) ++ set(WEBP_BUILD_MUX ON) ++endif() ++ ++if(WEBP_BUILD_MUX) + parse_Makefile_am(${CMAKE_CURRENT_SOURCE_DIR}/src/mux "WEBP_MUX_SRCS" + "") + add_library(webpmux ${WEBP_MUX_SRCS}) +@@ -322,6 +329,7 @@ install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/webp/decode.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/webp/types.h + DESTINATION include/webp) + install(TARGETS ${INSTALLED_LIBRARIES} ++ RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib) + diff --git a/ports/libwebp/portfile.cmake b/ports/libwebp/portfile.cmake index 22c028452..3c16eccbb 100644 --- a/ports/libwebp/portfile.cmake +++ b/ports/libwebp/portfile.cmake @@ -11,15 +11,20 @@ vcpkg_download_distfile(ARCHIVE ) vcpkg_extract_source_archive(${ARCHIVE}) +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/build_fixes.patch +) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - # dllexport support seem to be broken - OPTIONS -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON - -DCMAKE_DEBUG_POSTFIX=d + OPTIONS + -DCMAKE_DEBUG_POSTFIX=d + -DWEBP_BUILD_MUX=ON ) -vcpkg_build_cmake() vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) @@ -30,4 +35,4 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share) file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libwebp) file(RENAME ${CURRENT_PACKAGES_DIR}/share/libwebp/COPYING ${CURRENT_PACKAGES_DIR}/share/libwebp/copyright) -vcpkg_copy_pdbs()
\ No newline at end of file +vcpkg_copy_pdbs() |
