all repos — mgba @ 7fc91b1ae6c3e2f80358d39c05d5fc0b3797140d

mGBA Game Boy Advance Emulator

CMake: Fix CPack dependencies for libpng 1.6
Vicki Pfau vi@endrift.com
Sat, 16 Sep 2017 10:00:09 -0700
commit

7fc91b1ae6c3e2f80358d39c05d5fc0b3797140d

parent

486b7abc9460e985996d93e9cfc25c2e88d10aad

2 files changed, 11 insertions(+), 1 deletions(-)

jump to
M CHANGESCHANGES

@@ -48,6 +48,7 @@ - Test: Restructure test suite into multiple executables

- Python: Integrate tests from cinema test suite - Util: Don't build crc32 if the function already exists - GBA: Detect hardware for Pokémon FireRed ROM hacks + - CMake: Fix CPack dependencies for libpng 1.6 0.6.0: (2017-07-16) Features:
M CMakeLists.txtCMakeLists.txt

@@ -124,6 +124,7 @@ string(TOUPPER ${REQUIRE} UREQUIRE)

set(${UREQUIRE}_CFLAGS_OTHER ${${REQUIRE}_CFLAGS_OTHER} PARENT_SCOPE) set(${UREQUIRE}_FOUND ${${REQUIRE}_FOUND} PARENT_SCOPE) set(${UREQUIRE}_INCLUDE_DIRS ${${REQUIRE}_INCLUDE_DIRS} PARENT_SCOPE) + set(${UREQUIRE}_VERSION_STRING ${${REQUIRE}_VERSION_STRING} PARENT_SCOPE) if (APPLE) set(IS_FRAMEWORK OFF) set(LIBS)

@@ -526,7 +527,15 @@ if(USE_PNG)

list(APPEND FEATURES PNG) include_directories(AFTER ${PNG_INCLUDE_DIRS}) list(APPEND DEPENDENCY_LIB ${PNG_LIBRARIES} ${ZLIB_LIBRARIES}) - set(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS},libpng12-0") + if(PNG_VERSION_STRING) + string(REGEX MATCH "^[0-9]+\\.[0-9]+" PNG_VERSION_PARTIAL ${PNG_VERSION_STRING}) + if(${PNG_VERSION_PARTIAL} STREQUAL "1.6") + set(PNG_DEB_VERSION "16-16") + else() + set(PNG_DEB_VERSION "12-0") + endif() + set(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS},libpng${PNG_DEB_VERSION}") + endif() endif() if(WANT_SQLITE3 AND NOT USE_SQLITE3)