motoharu-gosuto / psvpfstools

Tools for decrypting PS Vita PFS filesystem
127 stars 22 forks source link

Various fixes for compilation with Clang #38

Open uyjulian opened 5 years ago

motoharu-gosuto commented 5 years ago

@uyjulian Hi man. Thanks for the fix. I will merge everything later, after I finish my work in io-api branch.

AuroraWright commented 4 years ago

This PR, plus adding these lines to https://github.com/motoharu-gosuto/psvpfstools/blob/master/cmake/scripts/ConfigureDependencies.cmake#L85 fixes macOS compilation:

if (APPLE)
execute_process(COMMAND brew --prefix zlib OUTPUT_VARIABLE BREW_PREFIX OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET)
set(ZLIB_INCLUDE_DIR ${BREW_PREFIX}/include)
set(ZLIB_LIBRARY ${BREW_PREFIX}/lib/libz.dylib)
endif()
uyjulian commented 4 years ago

Why not set PKG_CONFIG_PATH properly so that CMake can find it using the built in find_package macro?

AuroraWright commented 4 years ago

Not sure why but doing that didn't work, after I export the variable manually (homebrew doesn't because the package is keg-only, I think) pkg-config finds it if I run it from zsh and gives the correct paths but cmake still outputs "Could NOT find ZLIB (missing: ZLIB_LIBRARY) (found version "1.2.11")"