Skip to content

Commit

Permalink
fix linux
Browse files Browse the repository at this point in the history
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
```
  • Loading branch information
Voskrese authored Aug 28, 2018
1 parent 6b049c9 commit 306d019
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion ports/libraw/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -47,23 +47,30 @@ 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)

# 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)
Expand Down

0 comments on commit 306d019

Please sign in to comment.