RJVB / afsctool

This is a version of "brkirch"'s afsctool utility that allows end-users to leverage HFS+ compression.
https://brkirch.wordpress.com/afsctool
GNU General Public License v3.0
187 stars 18 forks source link

Building latest source... fatal error: 'FastCompression.h' file not found #30

Closed gingerbeardman closed 5 years ago

gingerbeardman commented 5 years ago

Salut mec,

Building latest source...

CMakeLists.txt says:

if(APPLE)
    find_file(LZVN_HEADER "FastCompression.h")
    find_library(LZVN_LIBRARY "FastCompression")
    message(STATUS "LZVN_HEADER,LIB: ${LZVN_HEADER} ${LZVN_LIBRARY}")
    include_directories(${ZLIBP_INCLUDE_DIR})
endif()

This works and during cmake I see:

-- LZVN_HEADER,LIB: /usr/local/include/FastCompression.h /usr/local/lib/libFastCompression.dylib
-- Enabling LZVN support

But during make I see:

Scanning dependencies of target afsctool
[ 81%] Building C object CMakeFiles/afsctool.dir/src/afsctool.c.o
/Users/matt/Projects/afsctool/src/afsctool.c:27:11: fatal error: 'FastCompression.h' file
      not found
#       include <FastCompression.h>
                ^~~~~~~~~~~~~~~~~~~
1 error generated.

So, I have to manually change:

#ifdef HAS_LZVN
#   include <FastCompression.h>
#endif

To this:

#ifdef HAS_LZVN
#   include </usr/local/include/FastCompression.h>
#endif

Not sure if there's a better way to do this using CMake/make?

Cheers!

RJVB commented 5 years ago
#ifdef HAS_LZVN
#  include </usr/local/include/FastCompression.h>
#endif

Not sure if there's a better way?

It's a bit surprising you have to add /usr/local/include because that's normally a standard location for headers... My FastCompression.h header is in /opt/local/include and it's possible that it's found there because other headers are there too and the path was thus already added to the search path. I'll look into adding the LZVN header path explicitly.