mirror of https://github.com/libAthena/athena.git
extern/zlib: Use find_library
This commit is contained in:
parent
1b8b7f6819
commit
0bc400b4d9
|
@ -1,5 +1,7 @@
|
||||||
find_package(ZLIB)
|
if(NOT WIN32) # remove when specter/freetype is gone
|
||||||
if(NOT ZLIB_FOUND)
|
find_library(ZLIB_LIB zlib)
|
||||||
|
endif()
|
||||||
|
if(NOT ZLIB_LIB)
|
||||||
message(STATUS "Using Athena's built-in zlib")
|
message(STATUS "Using Athena's built-in zlib")
|
||||||
add_library(z
|
add_library(z
|
||||||
adler32.c
|
adler32.c
|
||||||
|
@ -31,6 +33,6 @@ endif()
|
||||||
set(ZLIB_LIBRARIES z CACHE PATH "Zlib libraries" FORCE)
|
set(ZLIB_LIBRARIES z CACHE PATH "Zlib libraries" FORCE)
|
||||||
set(ZLIB_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE PATH "Zlib include path" FORCE)
|
set(ZLIB_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE PATH "Zlib include path" FORCE)
|
||||||
else()
|
else()
|
||||||
set(ZLIB_LIBRARIES ${ZLIB_LIBRARIES} CACHE PATH "Zlib libraries" FORCE)
|
set(ZLIB_LIBRARIES ${ZLIB_LIB} CACHE PATH "Zlib libraries" FORCE)
|
||||||
find_path(ZLIB_INCLUDE_DIR zlib.h)
|
find_path(ZLIB_INCLUDE_DIR zlib.h)
|
||||||
endif()
|
endif()
|
||||||
|
|
Loading…
Reference in New Issue