mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-29 03:34:26 +08:00
[libraw] fix import macro, correct dependencies
By default, libraw does not attempt to link to libjpeg, but does pick up jasper if present
This commit is contained in:
parent
57d078e8d1
commit
b8f51a1cdb
@ -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
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user