all repos — mgba @ e08087a682c011bd8893803939b67419fdd61b18

mGBA Game Boy Advance Emulator

All: Update libzip dependencies on Ubuntu
Jeffrey Pfau jeffrey@endrift.com
Tue, 24 May 2016 19:59:54 -0700
commit

e08087a682c011bd8893803939b67419fdd61b18

parent

73777259524e6ffc48f330f7c77f2e0bb86ad706

1 files changed, 8 insertions(+), 1 deletions(-)

jump to
M CMakeLists.txtCMakeLists.txt

@@ -437,7 +437,14 @@ link_directories(${LIBZIP_LIBRARY_DIRS})

list(APPEND DEPENDENCY_LIB ${LIBZIP_LIBRARIES}) list(APPEND FEATURES LIBZIP) list(APPEND VFS_SRC ${CMAKE_CURRENT_SOURCE_DIR}/src/util/vfs/vfs-zip.c) - set(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS},libzip2") + string(REGEX MATCH "^[0-9]+" LIBZIP_VERSION_MAJOR ${libzip_VERSION}) + if (LIBZIP_VERSION_MAJOR LESS 1) + set(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS},libzip2") + elseif(LIBZIP_VERSION_MAJOR EQUAL 1) + set(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS},libzip4") + else() + message(AUTHOR_WARNING Unknown version of libzip detected: ${libzip_VERSION}) + endif() elseif(USE_MINIZIP) include_directories(AFTER ${MINIZIP_INCLUDE_DIRS}) link_directories(${MINIZIP_LIBRARY_DIRS})