mirror of https://github.com/libAthena/athena.git
Fix zlib INTERFACE usage
This commit is contained in:
parent
066e3ae109
commit
e13b498266
|
@ -23,24 +23,26 @@ else ()
|
||||||
trees.c
|
trees.c
|
||||||
uncompr.c
|
uncompr.c
|
||||||
zutil.c
|
zutil.c
|
||||||
crc32.h
|
include/crc32.h
|
||||||
deflate.h
|
include/deflate.h
|
||||||
gzguts.h
|
include/gzguts.h
|
||||||
inffast.h
|
include/inffast.h
|
||||||
inffixed.h
|
include/inffixed.h
|
||||||
inflate.h
|
include/inflate.h
|
||||||
inftrees.h
|
include/inftrees.h
|
||||||
trees.h
|
include/trees.h
|
||||||
zconf.h
|
include/zconf.h
|
||||||
zlib.h
|
include/zlib.h
|
||||||
zutil.h)
|
include/zutil.h)
|
||||||
if (WIN32 AND NOT UNIX)
|
if (WIN32 AND NOT UNIX)
|
||||||
install(FILES zconf.h zlib.h DESTINATION include COMPONENT zlib)
|
install(FILES include/zconf.h include/zlib.h DESTINATION include COMPONENT zlib)
|
||||||
install(TARGETS z DESTINATION lib COMPONENT zlib)
|
install(TARGETS z DESTINATION lib COMPONENT zlib)
|
||||||
else ()
|
else ()
|
||||||
target_compile_options(z PRIVATE -Wno-implicit-fallthrough)
|
target_compile_options(z PRIVATE -Wno-implicit-fallthrough)
|
||||||
endif ()
|
endif ()
|
||||||
target_include_directories(z INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
|
target_include_directories(z PUBLIC
|
||||||
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||||
|
$<INSTALL_INTERFACE:include>)
|
||||||
set(ZLIB_LIBRARIES z CACHE STRING "zlib libraries" FORCE)
|
set(ZLIB_LIBRARIES z CACHE STRING "zlib libraries" FORCE)
|
||||||
set(ATHENA_ZLIB YES CACHE BOOL "Using built-in zlib" FORCE)
|
set(ATHENA_ZLIB YES CACHE BOOL "Using built-in zlib" FORCE)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
Loading…
Reference in New Issue