Disable pkg-config on Android, and use the existing macro for minizip

pull/1190/head
Antoine Bolvy 2017-02-27 18:23:39 -05:00
parent c3bb2b66ac
commit 125d2ab955
3 changed files with 9 additions and 9 deletions

View File

@ -185,7 +185,6 @@ if (ASSIMP_COVERALLS)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O0 -fprofile-arcs -ftest-coverage") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O0 -fprofile-arcs -ftest-coverage")
endif() endif()
INCLUDE (FindPkgConfig)
INCLUDE_DIRECTORIES( include ) INCLUDE_DIRECTORIES( include )
INCLUDE (PrecompiledHeader) INCLUDE (PrecompiledHeader)
@ -255,9 +254,7 @@ ENDIF(NOT ZLIB_FOUND)
INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR}) INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR})
# Search for unzip # Search for unzip
IF (PKG_CONFIG_FOUND) use_pkgconfig(UNZIP minizip)
PKG_CHECK_MODULES(UNZIP minizip)
ENDIF (PKG_CONFIG_FOUND)
IF ( ASSIMP_NO_EXPORT ) IF ( ASSIMP_NO_EXPORT )
ADD_DEFINITIONS( -DASSIMP_BUILD_NO_EXPORT) ADD_DEFINITIONS( -DASSIMP_BUILD_NO_EXPORT)

View File

@ -59,10 +59,13 @@ endmacro(clear_if_changed)
# Try to get some hints from pkg-config, if available # Try to get some hints from pkg-config, if available
macro(use_pkgconfig PREFIX PKGNAME) macro(use_pkgconfig PREFIX PKGNAME)
find_package(PkgConfig) # Android does not support PKG_CONFIG so we disable it
if (PKG_CONFIG_FOUND) IF ( NOT ANDROID )
pkg_check_modules(${PREFIX} ${PKGNAME}) find_package(PkgConfig)
endif () if (PKG_CONFIG_FOUND)
pkg_check_modules(${PREFIX} ${PKGNAME})
endif ()
ENDIF ( NOT ANDROID )
endmacro (use_pkgconfig) endmacro (use_pkgconfig)
# Couple a set of release AND debug libraries (or frameworks) # Couple a set of release AND debug libraries (or frameworks)

View File

@ -11,7 +11,7 @@
# Once done, this will define # Once done, this will define
# #
# ZLIB_FOUND - system has ZLIB # ZLIB_FOUND - system has ZLIB
# ZLIB_INCLUDE_DIRS - the ZLIB include directories # ZLIB_INCLUDE_DIRS - the ZLIB include directories
# ZLIB_LIBRARIES - link these to use ZLIB # ZLIB_LIBRARIES - link these to use ZLIB
include(FindPkgMacros) include(FindPkgMacros)