1
0
mirror of https://github.com/ScrelliCopter/VGM-Tools synced 2025-02-21 04:09:25 +11:00

neotools: code fixup & vgz support

This commit is contained in:
2023-12-10 10:37:15 +11:00
parent 9c5e19264b
commit 353d4e5def
4 changed files with 87 additions and 57 deletions

View File

@@ -1,3 +1,9 @@
find_package(ZLIB)
option(USE_ZLIB "Link Zlib for VGZ support" ${ZLIB_FOUND})
if (USE_ZLIB AND NOT ZLIB_FOUND)
message(FATAL_ERROR "USE_ZLIB specified but Zlib was not found")
endif()
add_executable(adpcm adpcm.c)
set_property(TARGET adpcm PROPERTY C_STANDARD 99)
target_compile_options(adpcm PRIVATE ${WARNINGS})
@@ -9,4 +15,6 @@ target_link_libraries(adpcmb Common::headers)
add_executable(neoadpcmextract autoextract.c neoadpcmextract.c)
set_property(TARGET neoadpcmextract PROPERTY C_STANDARD 99)
target_compile_definitions(neoadpcmextract PRIVATE $<$<BOOL:${USE_ZLIB}>:USE_ZLIB=1>)
target_compile_options(neoadpcmextract PRIVATE ${WARNINGS})
target_link_libraries(neoadpcmextract $<$<BOOL:${USE_ZLIB}>:ZLIB::ZLIB> Common::headers)