mirror of
https://gitee.com/houstudio/Cdroid.git
synced 2024-12-11 09:24:25 +08:00
28 lines
784 B
CMake
Executable File
28 lines
784 B
CMake
Executable File
find_package(PkgConfig)
|
|
pkg_check_modules(PC_BZIP2 bzip2)
|
|
|
|
find_path(BZIP2_INCLUDE_DIRS
|
|
NAMES bzlib.h
|
|
HINTS ${PC_BZIP2_INCLUDEDIR}
|
|
${PC_BZIP2_INCLUDE_DIRS}
|
|
)
|
|
|
|
find_library(BZIP2_LIBRARIES
|
|
NAMES bz2 bz2d
|
|
HINTS ${PC_BZIP2_LIBDIR}
|
|
${PC_BZIP2_LIBRARY_DIRS}
|
|
)
|
|
|
|
if(BZIP2_INCLUDE_DIRS AND BZIP2_LIBRARIES)
|
|
set(BZIP2_FOUND TRUE)
|
|
set(BZIP2_LIBRARY ${BZIP2_LIBRARIES})
|
|
set(BZIP2_INCLUDE_DIR ${BZIP2_INCLUDE_DIRS})
|
|
set(BZIP2_VERSION ${PC_BZIP2_VERSION})
|
|
endif()
|
|
|
|
include(FindPackageHandleStandardArgs)
|
|
#FIND_PACKAGE_HANDLE_STANDARD_ARGS(zlib REQUIRED_VARS BZIP2_INCLUDE_DIRS BZIP2_LIBRARIES
|
|
# FOUND_VAR BZIP2_FOUND VERSION_VAR BZIP2_VERSION)
|
|
mark_as_advanced(BZIP2_LIBRARIES BZIP2_LIBRARY BZIP2_INCLUDE_DIRS BZIP2_INCLUDE_DIR BZIP2_FOUND BZIP2_VERSION)
|
|
|