18 lines
474 B
CMake
18 lines
474 B
CMake
include(FindSimpleLibrary)
|
|
include(FindPackageHandleStandardArgs)
|
|
|
|
find_simple_library(libcZlib.a zlib.h "ZLIB_VERSION"
|
|
PATH_VAR CZLIB_PATH
|
|
VERSION_VAR CZLIB_VERSION)
|
|
|
|
find_package_handle_standard_args(cZlib
|
|
REQUIRED_VARS CZLIB_PATH CZLIB_VERSION
|
|
VERSION_VAR CZLIB_VERSION)
|
|
|
|
if(cZlib_FOUND)
|
|
add_library(cZlib::cZlib UNKNOWN IMPORTED)
|
|
set_target_properties(cZlib::cZlib PROPERTIES
|
|
IMPORTED_LOCATION "${CZLIB_PATH}"
|
|
INTERFACE_LINK_OPTIONS -lcZlib)
|
|
endif()
|