gdraheim / zziplib

The ZZIPlib provides read access on ZIP-archives and unpacked data. It features an additional simplified API following the standard Posix API for file access
Other
60 stars 50 forks source link

MacOS Build Issue #127

Closed snakebyte69 closed 1 year ago

snakebyte69 commented 2 years ago

% zziplib-master % cmake --build build [ 5%] Built target libzzipmmapped [ 5%] Built target libzzipmmaped_latest [ 8%] Built target libzzipfseeko [ 8%] Built target libzzipfseeko_latest [ 8%] Built target libzzipmmaped_links [ 21%] Built target libzzip [ 21%] Built target libzzip_links [ 23%] Built target pkgconfig [ 24%] Built target compat [ 24%] Built target libzzipfseeko_links [ 24%] Built target libzzip_latest [ 26%] Built target libzzipwrap [ 26%] Built target libzzipwrap_latest [ 26%] Built target pkgconfigs [ 28%] Built target zzipwrap [ 30%] Built target pkgconfig-sdl [ 31%] Linking C executable zzcatsdl ld: library not found for -lSDL2 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: [SDL/zzcatsdl] Error 1 make[1]: [SDL/CMakeFiles/zzcatsdl.dir/all] Error 2 make: *** [all] Error 2

This was the fix CMakeCache.txt //Build zzcatsdl (includable example code) ZZIPSDL:BOOL=OFF

gdraheim commented 2 years ago
SDL/CMakeLists.txt:pkg_search_module ( SDL sdl2)
SDL/CMakeLists.txt:if(SDL_FOUND)
SDL/CMakeLists.txt:add_executable(zzcatsdl ${ZZCATSDL_SRCS} )

The linkage to SDL should only be done if the lbrary is on the system. Where is it?

mojca commented 2 years ago

Side question. Even if the library isn't present: shouldn't this have failed during configuration (if explicitly requested by the user) rather than during the build?

gdraheim commented 2 years ago

@mojca - that's where I am wondering as well. But @snakebyte69 did not show the config phase results.