CMake: Fix CPack dependencies for libpng 1.6

This commit is contained in:
Vicki Pfau 2017-09-16 10:00:09 -07:00
parent 486b7abc94
commit 7fc91b1ae6
2 changed files with 11 additions and 1 deletions

View File

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

View File

@ -124,6 +124,7 @@ function(find_feature FEATURE_NAME FEATURE_REQUIRES)
set(${UREQUIRE}_CFLAGS_OTHER ${${REQUIRE}_CFLAGS_OTHER} PARENT_SCOPE) set(${UREQUIRE}_CFLAGS_OTHER ${${REQUIRE}_CFLAGS_OTHER} PARENT_SCOPE)
set(${UREQUIRE}_FOUND ${${REQUIRE}_FOUND} PARENT_SCOPE) set(${UREQUIRE}_FOUND ${${REQUIRE}_FOUND} PARENT_SCOPE)
set(${UREQUIRE}_INCLUDE_DIRS ${${REQUIRE}_INCLUDE_DIRS} PARENT_SCOPE) set(${UREQUIRE}_INCLUDE_DIRS ${${REQUIRE}_INCLUDE_DIRS} PARENT_SCOPE)
set(${UREQUIRE}_VERSION_STRING ${${REQUIRE}_VERSION_STRING} PARENT_SCOPE)
if (APPLE) if (APPLE)
set(IS_FRAMEWORK OFF) set(IS_FRAMEWORK OFF)
set(LIBS) set(LIBS)
@ -526,7 +527,15 @@ if(USE_PNG)
list(APPEND FEATURES PNG) list(APPEND FEATURES PNG)
include_directories(AFTER ${PNG_INCLUDE_DIRS}) include_directories(AFTER ${PNG_INCLUDE_DIRS})
list(APPEND DEPENDENCY_LIB ${PNG_LIBRARIES} ${ZLIB_LIBRARIES}) 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() endif()
if(WANT_SQLITE3 AND NOT USE_SQLITE3) if(WANT_SQLITE3 AND NOT USE_SQLITE3)