From 306d019ea62e50b422b9d1bd7f02e18db4363a0e Mon Sep 17 00:00:00 2001 From: Voskrese Date: Wed, 29 Aug 2018 03:10:26 +0800 Subject: fix linux error ``` CMake Error at ports/libraw/portfile.cmake:53 (file): file RENAME failed to rename /opt/vcpkg/packages/libraw_x64-linux/lib/raw_r.lib to /opt/vcpkg/packages/libraw_x64-linux/lib/raw.lib because: No such file or directory Call Stack (most recent call first): scripts/ports.cmake:71 (include) ``` ``` Include files should not be duplicated into the /debug/include directory. If this cannot be disabled in the project cmake, use file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) /debug/share should not exist. Please reorganize any important files, then use file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) Found 2 error(s). Please correct the portfile: /opt/vcpkg/ports/libraw/portfile.cmake -- Performing post-build validation done ``` --- ports/libraw/portfile.cmake | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ports/libraw/portfile.cmake b/ports/libraw/portfile.cmake index 3681d1d28..5351d78f6 100644 --- a/ports/libraw/portfile.cmake +++ b/ports/libraw/portfile.cmake @@ -47,6 +47,7 @@ else() endif() file(WRITE ${CURRENT_PACKAGES_DIR}/include/libraw/libraw_types.h "${LIBRAW_H}") +if(WIN32) # 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/rawd.lib) @@ -54,16 +55,22 @@ file(RENAME ${CURRENT_PACKAGES_DIR}/lib/raw_r.lib ${CURRENT_PACKAGES_DIR}/lib/ra file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/raw_rd.lib ${CURRENT_PACKAGES_DIR}/debug/lib/rawd.lib) # Cleanup -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(GLOB RELEASE_EXECUTABLES ${CURRENT_PACKAGES_DIR}/bin/*.exe) file(REMOVE ${RELEASE_EXECUTABLES}) file(GLOB DEBUG_EXECUTABLES ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) file(REMOVE ${DEBUG_EXECUTABLES}) +endif() + if(VCPKG_LIBRARY_LINKAGE STREQUAL static) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +if(WIN32) else() file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/raw.dll ${CURRENT_PACKAGES_DIR}/debug/bin/rawd.dll) endif() +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) # Rename cmake module into a config in order to allow more flexible lookup rules file(RENAME ${CURRENT_PACKAGES_DIR}/share/libraw/FindLibRaw.cmake ${CURRENT_PACKAGES_DIR}/share/libraw/LibRaw-config.cmake) -- cgit v1.2.3 From 94c644c6d3e518d3aff61bae497b42b6781ff3b1 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 28 Aug 2018 13:48:03 -0700 Subject: [libraw] Replace WIN32 with VCPKG_CMAKE_SYSTEM_NAME --- ports/libraw/CONTROL | 2 +- ports/libraw/portfile.cmake | 28 ++++++++++++++-------------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/ports/libraw/CONTROL b/ports/libraw/CONTROL index 5345138f8..431ba1dc7 100644 --- a/ports/libraw/CONTROL +++ b/ports/libraw/CONTROL @@ -1,4 +1,4 @@ Source: libraw -Version: 0.19.0 +Version: 0.19.0-1 Build-Depends: lcms, jasper Description: raw image decoder library diff --git a/ports/libraw/portfile.cmake b/ports/libraw/portfile.cmake index 5351d78f6..7badade25 100644 --- a/ports/libraw/portfile.cmake +++ b/ports/libraw/portfile.cmake @@ -47,26 +47,26 @@ else() endif() file(WRITE ${CURRENT_PACKAGES_DIR}/include/libraw/libraw_types.h "${LIBRAW_H}") -if(WIN32) -# 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/rawd.lib) -file(RENAME ${CURRENT_PACKAGES_DIR}/lib/raw_r.lib ${CURRENT_PACKAGES_DIR}/lib/raw.lib) -file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/raw_rd.lib ${CURRENT_PACKAGES_DIR}/debug/lib/rawd.lib) +if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + # 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/rawd.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/raw_r.lib ${CURRENT_PACKAGES_DIR}/lib/raw.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/raw_rd.lib ${CURRENT_PACKAGES_DIR}/debug/lib/rawd.lib) -# Cleanup -file(GLOB RELEASE_EXECUTABLES ${CURRENT_PACKAGES_DIR}/bin/*.exe) -file(REMOVE ${RELEASE_EXECUTABLES}) -file(GLOB DEBUG_EXECUTABLES ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) -file(REMOVE ${DEBUG_EXECUTABLES}) + # Cleanup + file(GLOB RELEASE_EXECUTABLES ${CURRENT_PACKAGES_DIR}/bin/*.exe) + file(REMOVE ${RELEASE_EXECUTABLES}) + file(GLOB DEBUG_EXECUTABLES ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) + file(REMOVE ${DEBUG_EXECUTABLES}) endif() if(VCPKG_LIBRARY_LINKAGE STREQUAL static) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) -if(WIN32) else() - file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/raw.dll ${CURRENT_PACKAGES_DIR}/debug/bin/rawd.dll) -endif() + if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/raw.dll ${CURRENT_PACKAGES_DIR}/debug/bin/rawd.dll) + endif() endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -- cgit v1.2.3