aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Karatarakis <alex@karatarakis.com>2017-08-23 09:26:54 -0700
committerGitHub <noreply@github.com>2017-08-23 09:26:54 -0700
commitf346de97f5963db3c01e2bb8a6c53d4a0a3a4ff3 (patch)
treecb472124c68a088688252b468636a2f850a339cb
parent2afdf3745e58257826c324b988e8c47e5851b85b (diff)
parentb8f51a1cdb3a8f782224dfe45ae31bebd426c5cb (diff)
downloadvcpkg-f346de97f5963db3c01e2bb8a6c53d4a0a3a4ff3.tar.gz
vcpkg-f346de97f5963db3c01e2bb8a6c53d4a0a3a4ff3.zip
Merge pull request #1687 from codicodi/libraw-fixes
[libraw] fix import macro, correct dependencies
-rw-r--r--ports/libraw/CONTROL4
-rw-r--r--ports/libraw/portfile.cmake10
2 files changed, 11 insertions, 3 deletions
diff --git a/ports/libraw/CONTROL b/ports/libraw/CONTROL
index 9d355533b..9d23b7740 100644
--- a/ports/libraw/CONTROL
+++ b/ports/libraw/CONTROL
@@ -1,4 +1,4 @@
Source: libraw
-Version: 0.18.2-2
-Build-Depends: lcms, libjpeg-turbo
+Version: 0.18.2-3
+Build-Depends: lcms, jasper
Description: raw image decoder library
diff --git a/ports/libraw/portfile.cmake b/ports/libraw/portfile.cmake
index 0b13213ad..797ca5aa0 100644
--- a/ports/libraw/portfile.cmake
+++ b/ports/libraw/portfile.cmake
@@ -23,13 +23,21 @@ file(COPY ${LIBRAW_CMAKE_SOURCE_PATH}/cmake DESTINATION ${SOURCE_PATH})
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
OPTIONS
-DINSTALL_CMAKE_MODULE_PATH=${CURRENT_PACKAGES_DIR}/share/libraw
)
-vcpkg_build_cmake()
vcpkg_install_cmake()
+file(READ ${CURRENT_PACKAGES_DIR}/include/libraw/libraw_types.h LIBRAW_H)
+if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
+ string(REPLACE "#ifdef LIBRAW_NODLL" "#if 1" LIBRAW_H "${LIBRAW_H}")
+else()
+ string(REPLACE "#ifdef LIBRAW_NODLL" "#if 0" LIBRAW_H "${LIBRAW_H}")
+endif()
+file(WRITE ${CURRENT_PACKAGES_DIR}/include/libraw/libraw_types.h "${LIBRAW_H}")
+
# Rename thread-safe version to be "raw.lib". This is unfortunately needed
# because otherwise libraries that build on top of libraw have to choose.
file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/raw.lib ${CURRENT_PACKAGES_DIR}/debug/lib/raw.lib)