mirror of
https://github.com/Rockbox/rockbox.git
synced 2026-04-11 16:37:45 -04:00
rbutil: Pull the internal/external QUAZIP library stuff into the toplevel
Prevents a build failure when we have to build quazip as part of the build Change-Id: I274cd4c358c50152bcfea2e33ad580fac0277e4a
This commit is contained in:
parent
11263d73af
commit
e11a449031
3 changed files with 34 additions and 43 deletions
|
|
@ -84,6 +84,40 @@ if(APPLE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
find_package(QuaZip-Qt${QT_VERSION_MAJOR} QUIET)
|
||||||
|
if(QuaZip-Qt${QT_VERSION_MAJOR}_FOUND)
|
||||||
|
message("-- Found QuaZip")
|
||||||
|
set(QUAZIP_LIBRARY QuaZip::QuaZip)
|
||||||
|
else()
|
||||||
|
message("-- QuaZip not found, building our own")
|
||||||
|
# TODO: Upstream has cmake support, use that instead.
|
||||||
|
add_library(quazip
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/quazip/ioapi.h
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/quazip/minizip_crypt.h
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/quazip/qioapi.cpp
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/quazip/quazip.cpp
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/quazip/quazipfile.cpp
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/quazip/quazipfile.h
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/quazip/quazipfileinfo.cpp
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/quazip/quazipfileinfo.h
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/quazip/quazip_global.h
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/quazip/quazip.h
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/quazip/quazipnewinfo.cpp
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/quazip/quazipnewinfo.h
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/quazip/unzip.c
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/quazip/unzip.h
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/quazip/zip.c
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/quazip/zip.h)
|
||||||
|
target_include_directories(quazip PUBLIC ${CMAKE_CURRENT_LIST_DIR}/rbutilqt/quazip)
|
||||||
|
target_link_libraries(quazip z Qt${QT_VERSION_MAJOR}::Core)
|
||||||
|
if(QT_VERSION_MAJOR EQUAL 6)
|
||||||
|
target_link_libraries(quazip Qt${QT_VERSION_MAJOR}::Core5Compat)
|
||||||
|
endif()
|
||||||
|
target_compile_definitions(quazip PUBLIC QUAZIP_STATIC)
|
||||||
|
set_property(TARGET quazip PROPERTY AUTOMOC ON)
|
||||||
|
set(QUAZIP_LIBRARY quazip)
|
||||||
|
endif()
|
||||||
|
|
||||||
add_executable(ipodpatcher-bin
|
add_executable(ipodpatcher-bin
|
||||||
ipodpatcher/main.c
|
ipodpatcher/main.c
|
||||||
ipodpatcher/ipodpatcher-aupd.c
|
ipodpatcher/ipodpatcher-aupd.c
|
||||||
|
|
@ -392,4 +426,3 @@ include(${CMAKE_CURRENT_LIST_DIR}/cmake/deploy.cmake)
|
||||||
include(${CMAKE_CURRENT_LIST_DIR}/cmake/QtTest.cmake)
|
include(${CMAKE_CURRENT_LIST_DIR}/cmake/QtTest.cmake)
|
||||||
add_subdirectory(rbutilqt)
|
add_subdirectory(rbutilqt)
|
||||||
add_subdirectory(themeeditor)
|
add_subdirectory(themeeditor)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -256,41 +256,6 @@ if(APPLE)
|
||||||
${CMAKE_CURRENT_LIST_DIR}/base/ttscarbon.h)
|
${CMAKE_CURRENT_LIST_DIR}/base/ttscarbon.h)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_package(QuaZip-Qt${QT_VERSION_MAJOR} QUIET)
|
|
||||||
if(QuaZip-Qt${QT_VERSION_MAJOR}_FOUND)
|
|
||||||
message("-- Found QuaZip")
|
|
||||||
set(QUAZIP_LIBRARY QuaZip::QuaZip)
|
|
||||||
else()
|
|
||||||
message("-- QuaZip not found, building our own")
|
|
||||||
# TODO: Upstream has cmake support, use that instead.
|
|
||||||
add_library(quazip
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/quazip/ioapi.h
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/quazip/minizip_crypt.h
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/quazip/qioapi.cpp
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/quazip/quazip.cpp
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/quazip/quazipfile.cpp
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/quazip/quazipfile.h
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/quazip/quazipfileinfo.cpp
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/quazip/quazipfileinfo.h
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/quazip/quazip_global.h
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/quazip/quazip.h
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/quazip/quazipnewinfo.cpp
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/quazip/quazipnewinfo.h
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/quazip/unzip.c
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/quazip/unzip.h
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/quazip/zip.c
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/quazip/zip.h
|
|
||||||
)
|
|
||||||
target_include_directories(quazip PUBLIC ${CMAKE_CURRENT_LIST_DIR}/quazip)
|
|
||||||
target_link_libraries(quazip z Qt${QT_VERSION_MAJOR}::Core)
|
|
||||||
if(QT_VERSION_MAJOR EQUAL 6)
|
|
||||||
target_link_libraries(quazip Qt${QT_VERSION_MAJOR}::Core5Compat)
|
|
||||||
endif()
|
|
||||||
target_compile_definitions(quazip PUBLIC QUAZIP_STATIC)
|
|
||||||
set_property(TARGET quazip PROPERTY AUTOMOC ON)
|
|
||||||
set(QUAZIP_LIBRARY quazip)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
target_link_libraries(rbbase
|
target_link_libraries(rbbase
|
||||||
cutelogger ${QUAZIP_LIBRARY} mspack bspatch rbspeex
|
cutelogger ${QUAZIP_LIBRARY} mspack bspatch rbspeex
|
||||||
voicefont sansapatcher ipodpatcher chinachippatcher
|
voicefont sansapatcher ipodpatcher chinachippatcher
|
||||||
|
|
|
||||||
|
|
@ -13,13 +13,6 @@
|
||||||
# KIND, either express or implied.
|
# KIND, either express or implied.
|
||||||
#
|
#
|
||||||
|
|
||||||
find_package(QuaZip-Qt${QT_VERSION_MAJOR} QUIET)
|
|
||||||
if(QuaZip-Qt${QT_VERSION_MAJOR}_FOUND)
|
|
||||||
set(QUAZIP_LIBRARY QuaZip::QuaZip)
|
|
||||||
else()
|
|
||||||
set(QUAZIP_LIBRARY quazip)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
add_executable(RockboxThemeEditor WIN32 MACOSX_BUNDLE
|
add_executable(RockboxThemeEditor WIN32 MACOSX_BUNDLE
|
||||||
graphics/rbalbumart.cpp
|
graphics/rbalbumart.cpp
|
||||||
graphics/rbalbumart.h
|
graphics/rbalbumart.h
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue