aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2016-11-29 17:12:45 -0800
committerRobert Schumacher <roschuma@microsoft.com>2016-11-29 17:12:45 -0800
commitab147b838b79692b838e6d3cf794a8caef3e5629 (patch)
tree71a619fb2a7b56dffdbc6d2180e734608e7e1657
parent7097f27cadf45d4b891396cb6bc24eddba3dd698 (diff)
downloadvcpkg-ab147b838b79692b838e6d3cf794a8caef3e5629.tar.gz
vcpkg-ab147b838b79692b838e6d3cf794a8caef3e5629.zip
[vcpkg] Remove link-time choice of thread-safe vs non-thread-safe so that dependent libraries make the right choice.
-rw-r--r--ports/libraw/CONTROL2
-rw-r--r--ports/libraw/portfile.cmake10
2 files changed, 9 insertions, 3 deletions
diff --git a/ports/libraw/CONTROL b/ports/libraw/CONTROL
index d627cdd16..dd5c7a5c3 100644
--- a/ports/libraw/CONTROL
+++ b/ports/libraw/CONTROL
@@ -1,4 +1,4 @@
Source: libraw
-Version: 0.17.2
+Version: 0.17.2-1
Build-Depends: libjpeg-turbo
Description: raw image decoder library
diff --git a/ports/libraw/portfile.cmake b/ports/libraw/portfile.cmake
index 69c168a07..3ff69a6e0 100644
--- a/ports/libraw/portfile.cmake
+++ b/ports/libraw/portfile.cmake
@@ -23,12 +23,16 @@ file(COPY ${LIBRAW_CMAKE_SOURCE_PATH}/cmake DESTINATION ${SOURCE_PATH})
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
OPTIONS
- -DINSTALL_CMAKE_MODULE_PATH=${SOURCE_PATH}
+ -DINSTALL_CMAKE_MODULE_PATH=${CURRENT_PACKAGES_DIR}/share/libraw
)
vcpkg_install_cmake()
-file(COPY ${SOURCE_PATH}/FindLibRaw.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/libraw/cmake/FindLibRaw.cmake)
+# 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)
+file(RENAME ${CURRENT_PACKAGES_DIR}/lib/raw_r.lib ${CURRENT_PACKAGES_DIR}/lib/raw.lib)
+file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/raw_r.lib ${CURRENT_PACKAGES_DIR}/debug/lib/raw.lib)
# Cleanup
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
@@ -38,6 +42,8 @@ file(GLOB DEBUG_EXECUTABLES ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe)
file(REMOVE ${DEBUG_EXECUTABLES})
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
+else()
+ file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/raw.dll ${CURRENT_PACKAGES_DIR}/debug/bin/raw.dll)
endif()
# Handle copyright