rbutil: Split out rbutilqt parts into separate cmake list.
Change-Id: I84ada20765b98620e1f06bc7116bbdaaae296fe9
This commit is contained in:
parent
c979717b80
commit
e9ef7f0dd3
2 changed files with 408 additions and 391 deletions
|
@ -76,345 +76,6 @@ if(APPLE)
|
|||
find_library(FRAMEWORK_CORESERVICES CoreServices)
|
||||
endif()
|
||||
|
||||
set(RBUTIL_TS_FILES
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/lang/rbutil_cs.ts
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/lang/rbutil_de.ts
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/lang/rbutil_fi.ts
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/lang/rbutil_fr.ts
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/lang/rbutil_gr.ts
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/lang/rbutil_he.ts
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/lang/rbutil_it.ts
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/lang/rbutil_ja.ts
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/lang/rbutil_nl.ts
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/lang/rbutil_pl.ts
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/lang/rbutil_pt_BR.ts
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/lang/rbutil_pt.ts
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/lang/rbutil_ru.ts
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/lang/rbutil_tr.ts
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/lang/rbutil_zh_CN.ts
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/lang/rbutil_zh_TW.ts
|
||||
)
|
||||
if(QT_VERSION_MAJOR EQUAL 5)
|
||||
qt5_add_translation(RBUTIL_QM_FILES ${RBUTIL_TS_FILES})
|
||||
else()
|
||||
qt6_add_translation(RBUTIL_QM_FILES ${RBUTIL_TS_FILES})
|
||||
endif()
|
||||
|
||||
# The qrc file searches input files based on its location, and the qm files are
|
||||
# generated in the build dir. Copy the qrc file to the build dir, make it
|
||||
# depend on the qm files. cmake will then get deps right.
|
||||
add_custom_command(
|
||||
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/rbutilqt-lang.qrc
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/lang/rbutilqt-lang.qrc
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
DEPENDS ${RBUTIL_QM_FILES}
|
||||
)
|
||||
|
||||
add_executable(RockboxUtility WIN32 MACOSX_BUNDLE
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/main.cpp
|
||||
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/aboutbox.ui
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/configure.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/configurefrm.ui
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/configure.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/createvoicefrm.ui
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/createvoicewindow.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/createvoicewindow.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/encttscfggui.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/encttscfggui.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/installtalkfrm.ui
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/installtalkwindow.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/installtalkwindow.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/preview.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/previewfrm.ui
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/preview.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/progressloggerfrm.ui
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/progressloggergui.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/progressloggergui.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/rbutilqt.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/rbutilqtfrm.ui
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/rbutilqt.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/sysinfo.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/sysinfofrm.ui
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/sysinfo.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/systrace.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/systracefrm.ui
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/systrace.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/themesinstallfrm.ui
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/themesinstallwindow.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/themesinstallwindow.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/uninstallfrm.ui
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/uninstallwindow.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/uninstallwindow.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/version.h
|
||||
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/gui/backupdialog.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/gui/backupdialogfrm.ui
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/gui/backupdialog.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/gui/changelog.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/gui/changelogfrm.ui
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/gui/changelog.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/gui/comboboxviewdelegate.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/gui/comboboxviewdelegate.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/gui/infowidget.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/gui/infowidgetfrm.ui
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/gui/infowidget.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/gui/selectiveinstallwidget.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/gui/selectiveinstallwidgetfrm.ui
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/gui/selectiveinstallwidget.h
|
||||
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/rbutilqt.qrc
|
||||
${CMAKE_CURRENT_BINARY_DIR}/rbutilqt-lang.qrc
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
target_sources(RockboxUtility PRIVATE
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/rbutilqt-win.qrc
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/rbutilqt.rc)
|
||||
# needed on Windows, otherwise svg icons won't show.
|
||||
target_link_libraries(RockboxUtility Qt${QT_VERSION_MAJOR}::QSvgIconPlugin)
|
||||
endif()
|
||||
if(APPLE)
|
||||
# MacOS Application Bundle specifics.
|
||||
target_sources(RockboxUtility PRIVATE
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/icons/rbutilqt.icns)
|
||||
set_target_properties(RockboxUtility
|
||||
PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_LIST_DIR}/rbutilqt/Info.plist)
|
||||
set_source_files_properties(${CMAKE_CURRENT_LIST_DIR}/rbutilqt/icons/rbutilqt.icns
|
||||
PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
|
||||
endif()
|
||||
|
||||
target_link_libraries(RockboxUtility rbbase cutelogger
|
||||
Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::Multimedia)
|
||||
|
||||
target_include_directories(RockboxUtility PRIVATE
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/gui
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt)
|
||||
target_compile_definitions(RockboxUtility PRIVATE
|
||||
QT_DEPRECATED_WARNINGS
|
||||
RBUTIL _LARGEFILE64_SOURCE UNICODE)
|
||||
|
||||
set_property(TARGET RockboxUtility PROPERTY AUTOMOC ON)
|
||||
set_property(TARGET RockboxUtility PROPERTY AUTORCC ON)
|
||||
set_property(TARGET RockboxUtility PROPERTY AUTOUIC ON)
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/cmake/deploy.cmake)
|
||||
deploy_qt(RockboxUtility
|
||||
${QT_BINDIR}
|
||||
${CMAKE_CURRENT_LIST_DIR}/../docs/logo/rockbox-clef.svg
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/RockboxUtility.desktop
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/dmgbuild.cfg)
|
||||
|
||||
add_library(rbbase
|
||||
${CMAKE_CURRENT_LIST_DIR}/../tools/iriver.c
|
||||
${CMAKE_CURRENT_LIST_DIR}/../tools/iriver.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/../tools/mkboot.c
|
||||
${CMAKE_CURRENT_LIST_DIR}/../tools/mkboot.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/../tools/wavtrim.c
|
||||
${CMAKE_CURRENT_LIST_DIR}/../tools/wavtrim.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/archiveutil.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/archiveutil.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/autodetection.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/autodetection.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/bootloaderinstallams.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/bootloaderinstallams.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/bootloaderinstallbase.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/bootloaderinstallbase.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/bootloaderinstallbspatch.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/bootloaderinstallbspatch.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/bootloaderinstallchinachip.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/bootloaderinstallchinachip.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/bootloaderinstallfile.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/bootloaderinstallfile.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/bootloaderinstallhelper.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/bootloaderinstallhelper.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/bootloaderinstallhex.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/bootloaderinstallhex.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/bootloaderinstallimx.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/bootloaderinstallimx.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/bootloaderinstallipod.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/bootloaderinstallipod.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/bootloaderinstallmi4.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/bootloaderinstallmi4.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/bootloaderinstallmpio.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/bootloaderinstallmpio.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/bootloaderinstalls5l.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/bootloaderinstalls5l.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/bootloaderinstallsansa.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/bootloaderinstallsansa.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/bootloaderinstalltcc.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/bootloaderinstalltcc.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/encoderbase.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/encoderbase.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/encoderexe.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/encoderexe.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/encoderlame.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/encoderlame.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/encoderrbspeex.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/encoderrbspeex.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/encttssettings.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/encttssettings.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/httpget.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/httpget.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/mspackutil.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/mspackutil.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/progressloggerinterface.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/playerbuildinfo.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/playerbuildinfo.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/rbsettings.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/rbsettings.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/rockboxinfo.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/rockboxinfo.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/system.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/system.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/talkfile.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/talkfile.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/talkgenerator.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/talkgenerator.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/ttsbase.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/ttsbase.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/ttsespeak.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/ttsespeakng.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/ttsexes.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/ttsexes.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/ttsfestival.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/ttsfestival.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/ttsflite.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/ttsmimic.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/ttsmssp.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/ttssapi.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/ttssapi.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/ttssapi4.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/ttsswift.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/uninstall.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/uninstall.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/utils.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/utils.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/voicefile.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/voicefile.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/zipinstaller.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/zipinstaller.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/ziputil.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/ziputil.h
|
||||
)
|
||||
|
||||
if(APPLE)
|
||||
target_sources(rbbase PRIVATE
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/ttscarbon.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base/ttscarbon.h)
|
||||
endif()
|
||||
|
||||
target_link_libraries(rbbase
|
||||
cutelogger quazip mspack bspatch rbspeex voicefont
|
||||
sansapatcher ipodpatcher chinachippatcher
|
||||
mkamsboot mkimxboot mkmpioboot mktccboot mks5lboot
|
||||
Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Network)
|
||||
target_include_directories(rbbase PUBLIC ${CMAKE_CURRENT_LIST_DIR}/rbutilqt/base)
|
||||
target_include_directories(rbbase PRIVATE ${CMAKE_CURRENT_LIST_DIR}/rbutilqt)
|
||||
target_include_directories(rbbase PUBLIC ${CMAKE_CURRENT_LIST_DIR}/../tools)
|
||||
target_compile_definitions(rbbase PUBLIC RBUTIL _LARGEFILE64_SOURCE UNICODE)
|
||||
target_compile_definitions(rbbase PRIVATE QT_DEPRECATED_WARNINGS)
|
||||
if(WIN32)
|
||||
target_link_libraries(rbbase setupapi ws2_32 netapi32 crypt32 iphlpapi)
|
||||
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
|
||||
target_link_libraries(rbbase PkgConfig::libusb)
|
||||
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")
|
||||
target_link_libraries(rbbase ${FRAMEWORK_IOKIT} ${FRAMEWORK_COREFOUNDATION}
|
||||
${FRAMEWORK_CARBON} ${FRAMEWORK_SYSTEMCONFIGURATION} ${FRAMEWORK_CORESERVICES})
|
||||
endif()
|
||||
set_property(TARGET rbbase PROPERTY AUTOMOC ON)
|
||||
|
||||
# TODO: Upstream has cmake support, use that instead.
|
||||
add_library(cutelogger)
|
||||
# need to put those separate, otherwise cmake will not add them correctly -- seems to be related to moc'ing.
|
||||
target_sources(cutelogger PUBLIC
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/logger/include/AbstractAppender.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/logger/include/AbstractStringAppender.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/logger/include/ConsoleAppender.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/logger/include/CuteLogger_global.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/logger/include/FileAppender.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/logger/include/Logger.h
|
||||
#${CMAKE_CURRENT_LIST_DIR}/rbutilqt/logger/include/OutputDebugAppender.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/logger/src/AbstractAppender.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/logger/src/AbstractStringAppender.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/logger/src/ConsoleAppender.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/logger/src/FileAppender.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt/logger/src/Logger.cpp
|
||||
#${CMAKE_CURRENT_LIST_DIR}/rbutilqt/logger/src/OutputDebugAppender.cpp
|
||||
)
|
||||
target_include_directories(cutelogger PUBLIC ${CMAKE_CURRENT_LIST_DIR}/rbutilqt/logger/include)
|
||||
target_link_libraries(cutelogger PUBLIC Qt${QT_VERSION_MAJOR}::Core)
|
||||
target_compile_definitions(cutelogger PUBLIC CUTELOGGER_STATIC)
|
||||
set_property(TARGET cutelogger PROPERTY AUTOMOC ON)
|
||||
|
||||
# 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)
|
||||
|
||||
add_library(mspack
|
||||
rbutilqt/mspack/cabc.c
|
||||
rbutilqt/mspack/cabd.c
|
||||
rbutilqt/mspack/cab.h
|
||||
#rbutilqt/mspack/chmc.c
|
||||
#rbutilqt/mspack/chmd.c
|
||||
#rbutilqt/mspack/chm.h
|
||||
rbutilqt/mspack/des.h
|
||||
#rbutilqt/mspack/hlpc.c
|
||||
#rbutilqt/mspack/hlpd.c
|
||||
#rbutilqt/mspack/hlp.h
|
||||
#rbutilqt/mspack/kwajc.c
|
||||
#rbutilqt/mspack/kwajd.c
|
||||
#rbutilqt/mspack/kwaj.h
|
||||
#rbutilqt/mspack/litc.c
|
||||
#rbutilqt/mspack/litd.c
|
||||
#rbutilqt/mspack/lit.h
|
||||
#rbutilqt/mspack/lzssd.c
|
||||
#rbutilqt/mspack/lzss.h
|
||||
rbutilqt/mspack/lzxc.c
|
||||
rbutilqt/mspack/lzxd.c
|
||||
rbutilqt/mspack/lzx.h
|
||||
rbutilqt/mspack/mspack.h
|
||||
rbutilqt/mspack/mszipc.c
|
||||
rbutilqt/mspack/mszipd.c
|
||||
rbutilqt/mspack/mszip.h
|
||||
rbutilqt/mspack/qtmd.c
|
||||
rbutilqt/mspack/qtm.h
|
||||
rbutilqt/mspack/readbits.h
|
||||
rbutilqt/mspack/readhuff.h
|
||||
rbutilqt/mspack/sha.h
|
||||
rbutilqt/mspack/system-mspack.c
|
||||
rbutilqt/mspack/system-mspack.h
|
||||
#rbutilqt/mspack/szddc.c
|
||||
#rbutilqt/mspack/szddd.c
|
||||
#rbutilqt/mspack/szdd.h
|
||||
)
|
||||
|
||||
target_include_directories(mspack PUBLIC ${CMAKE_CURRENT_LIST_DIR}/rbutilqt/mspack)
|
||||
|
||||
|
||||
add_library(ipodpatcher
|
||||
ipodpatcher/arc4.h
|
||||
|
@ -672,55 +333,5 @@ add_library(rbtomcrypt
|
|||
)
|
||||
target_include_directories(rbtomcrypt PUBLIC ${CMAKE_CURRENT_LIST_DIR}/tomcrypt/src/headers)
|
||||
|
||||
|
||||
# Unit tests
|
||||
add_executable(test_compareversion
|
||||
rbutilqt/base/utils.cpp
|
||||
rbutilqt/base/utils.h
|
||||
rbutilqt/test/stubs/stubs-compareversion.cpp
|
||||
rbutilqt/test/test-compareversion.cpp)
|
||||
|
||||
target_link_libraries(test_compareversion Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Test)
|
||||
target_compile_definitions(test_compareversion PRIVATE UNICODE)
|
||||
if(APPLE)
|
||||
target_link_libraries(test_compareversion ${FRAMEWORK_IOKIT} ${FRAMEWORK_COREFOUNDATION}
|
||||
${FRAMEWORK_CARBON} ${FRAMEWORK_SYSTEMCONFIGURATION} ${FRAMEWORK_CORESERVICES})
|
||||
endif()
|
||||
target_include_directories(test_compareversion PRIVATE rbutilqt/base rbutilqt/test/stubs)
|
||||
add_test(test_compareversion test_compareversion)
|
||||
set_property(TARGET test_compareversion PROPERTY AUTOMOC ON)
|
||||
|
||||
add_executable(test_httpget
|
||||
rbutilqt/test/test-httpget.cpp
|
||||
rbutilqt/base/httpget.cpp
|
||||
rbutilqt/base/httpget.h)
|
||||
target_link_libraries(test_httpget Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Test Qt${QT_VERSION_MAJOR}::Network)
|
||||
target_include_directories(test_httpget PRIVATE rbutilqt/base rbutilqt/test/stubs)
|
||||
add_test(test_httpget test_httpget)
|
||||
set_property(TARGET test_httpget PROPERTY AUTOMOC ON)
|
||||
|
||||
add_executable(test_playerbuildinfo
|
||||
rbutilqt/base/playerbuildinfo.cpp
|
||||
rbutilqt/base/playerbuildinfo.h
|
||||
rbutilqt/base/rbsettings.h
|
||||
rbutilqt/base/rockboxinfo.h
|
||||
rbutilqt/rbutilqt.qrc # needed for rbutil.ini resource.
|
||||
rbutilqt/test/stubs/stubs-playerbuildinfo.cpp
|
||||
rbutilqt/test/test-playerbuildinfo.cpp)
|
||||
target_link_libraries(test_playerbuildinfo Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Test)
|
||||
target_include_directories(test_playerbuildinfo PRIVATE rbutilqt/base rbutilqt/test/stubs)
|
||||
add_test(test_playerbuildinfo test_playerbuildinfo)
|
||||
set_property(TARGET test_playerbuildinfo PROPERTY AUTOMOC ON)
|
||||
set_property(TARGET test_playerbuildinfo PROPERTY AUTORCC ON)
|
||||
|
||||
add_executable(test_rockboxinfo
|
||||
rbutilqt/base/rockboxinfo.cpp
|
||||
rbutilqt/base/rockboxinfo.h
|
||||
rbutilqt/test/test-rockboxinfo.cpp)
|
||||
|
||||
target_link_libraries(test_rockboxinfo Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Test)
|
||||
target_include_directories(test_rockboxinfo PRIVATE rbutilqt/base rbutilqt/test/stubs)
|
||||
target_compile_definitions(test_rockboxinfo PRIVATE UNICODE)
|
||||
add_test(test_rockboxinfo test_rockboxinfo)
|
||||
set_property(TARGET test_rockboxinfo PROPERTY AUTOMOC ON)
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/cmake/deploy.cmake)
|
||||
add_subdirectory(rbutilqt)
|
||||
|
|
406
utils/rbutilqt/CMakeLists.txt
Normal file
406
utils/rbutilqt/CMakeLists.txt
Normal file
|
@ -0,0 +1,406 @@
|
|||
#
|
||||
# __________ __ ___.
|
||||
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
||||
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
||||
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||
# \/ \/ \/ \/ \/
|
||||
#
|
||||
# All files in this archive are subject to the GNU General Public License.
|
||||
# See the file COPYING in the source tree root for full license agreement.
|
||||
#
|
||||
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
# KIND, either express or implied.
|
||||
#
|
||||
|
||||
set(RBUTIL_TS_FILES
|
||||
${CMAKE_CURRENT_LIST_DIR}/lang/rbutil_cs.ts
|
||||
${CMAKE_CURRENT_LIST_DIR}/lang/rbutil_de.ts
|
||||
${CMAKE_CURRENT_LIST_DIR}/lang/rbutil_fi.ts
|
||||
${CMAKE_CURRENT_LIST_DIR}/lang/rbutil_fr.ts
|
||||
${CMAKE_CURRENT_LIST_DIR}/lang/rbutil_gr.ts
|
||||
${CMAKE_CURRENT_LIST_DIR}/lang/rbutil_he.ts
|
||||
${CMAKE_CURRENT_LIST_DIR}/lang/rbutil_it.ts
|
||||
${CMAKE_CURRENT_LIST_DIR}/lang/rbutil_ja.ts
|
||||
${CMAKE_CURRENT_LIST_DIR}/lang/rbutil_nl.ts
|
||||
${CMAKE_CURRENT_LIST_DIR}/lang/rbutil_pl.ts
|
||||
${CMAKE_CURRENT_LIST_DIR}/lang/rbutil_pt_BR.ts
|
||||
${CMAKE_CURRENT_LIST_DIR}/lang/rbutil_pt.ts
|
||||
${CMAKE_CURRENT_LIST_DIR}/lang/rbutil_ru.ts
|
||||
${CMAKE_CURRENT_LIST_DIR}/lang/rbutil_tr.ts
|
||||
${CMAKE_CURRENT_LIST_DIR}/lang/rbutil_zh_CN.ts
|
||||
${CMAKE_CURRENT_LIST_DIR}/lang/rbutil_zh_TW.ts
|
||||
)
|
||||
if(QT_VERSION_MAJOR EQUAL 5)
|
||||
qt5_add_translation(RBUTIL_QM_FILES ${RBUTIL_TS_FILES})
|
||||
else()
|
||||
qt6_add_translation(RBUTIL_QM_FILES ${RBUTIL_TS_FILES})
|
||||
endif()
|
||||
|
||||
# The qrc file searches input files based on its location, and the qm files are
|
||||
# generated in the build dir. Copy the qrc file to the build dir, make it
|
||||
# depend on the qm files. cmake will then get deps right.
|
||||
add_custom_command(
|
||||
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/rbutilqt-lang.qrc
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||
${CMAKE_CURRENT_LIST_DIR}/lang/rbutilqt-lang.qrc
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
DEPENDS ${RBUTIL_QM_FILES}
|
||||
)
|
||||
|
||||
add_executable(RockboxUtility WIN32 MACOSX_BUNDLE
|
||||
${CMAKE_CURRENT_LIST_DIR}/main.cpp
|
||||
|
||||
${CMAKE_CURRENT_LIST_DIR}/aboutbox.ui
|
||||
${CMAKE_CURRENT_LIST_DIR}/configure.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/configurefrm.ui
|
||||
${CMAKE_CURRENT_LIST_DIR}/configure.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/createvoicefrm.ui
|
||||
${CMAKE_CURRENT_LIST_DIR}/createvoicewindow.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/createvoicewindow.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/encttscfggui.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/encttscfggui.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/installtalkfrm.ui
|
||||
${CMAKE_CURRENT_LIST_DIR}/installtalkwindow.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/installtalkwindow.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/preview.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/previewfrm.ui
|
||||
${CMAKE_CURRENT_LIST_DIR}/preview.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/progressloggerfrm.ui
|
||||
${CMAKE_CURRENT_LIST_DIR}/progressloggergui.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/progressloggergui.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqtfrm.ui
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/sysinfo.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/sysinfofrm.ui
|
||||
${CMAKE_CURRENT_LIST_DIR}/sysinfo.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/systrace.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/systracefrm.ui
|
||||
${CMAKE_CURRENT_LIST_DIR}/systrace.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/themesinstallfrm.ui
|
||||
${CMAKE_CURRENT_LIST_DIR}/themesinstallwindow.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/themesinstallwindow.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/uninstallfrm.ui
|
||||
${CMAKE_CURRENT_LIST_DIR}/uninstallwindow.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/uninstallwindow.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/version.h
|
||||
|
||||
${CMAKE_CURRENT_LIST_DIR}/gui/backupdialog.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/gui/backupdialogfrm.ui
|
||||
${CMAKE_CURRENT_LIST_DIR}/gui/backupdialog.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/gui/changelog.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/gui/changelogfrm.ui
|
||||
${CMAKE_CURRENT_LIST_DIR}/gui/changelog.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/gui/comboboxviewdelegate.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/gui/comboboxviewdelegate.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/gui/infowidget.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/gui/infowidgetfrm.ui
|
||||
${CMAKE_CURRENT_LIST_DIR}/gui/infowidget.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/gui/selectiveinstallwidget.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/gui/selectiveinstallwidgetfrm.ui
|
||||
${CMAKE_CURRENT_LIST_DIR}/gui/selectiveinstallwidget.h
|
||||
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt.qrc
|
||||
${CMAKE_CURRENT_BINARY_DIR}/rbutilqt-lang.qrc
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
target_sources(RockboxUtility PRIVATE
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt-win.qrc
|
||||
${CMAKE_CURRENT_LIST_DIR}/rbutilqt.rc)
|
||||
# needed on Windows, otherwise svg icons won't show.
|
||||
target_link_libraries(RockboxUtility Qt${QT_VERSION_MAJOR}::QSvgIconPlugin)
|
||||
endif()
|
||||
if(APPLE)
|
||||
# MacOS Application Bundle specifics.
|
||||
target_sources(RockboxUtility PRIVATE
|
||||
${CMAKE_CURRENT_LIST_DIR}/icons/rbutilqt.icns)
|
||||
set_target_properties(RockboxUtility
|
||||
PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_LIST_DIR}/Info.plist)
|
||||
set_source_files_properties(${CMAKE_CURRENT_LIST_DIR}/icons/rbutilqt.icns
|
||||
PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
|
||||
endif()
|
||||
|
||||
target_link_libraries(RockboxUtility rbbase cutelogger
|
||||
Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::Multimedia)
|
||||
|
||||
target_include_directories(RockboxUtility PRIVATE
|
||||
${CMAKE_CURRENT_LIST_DIR}/gui
|
||||
${CMAKE_CURRENT_LIST_DIR})
|
||||
target_compile_definitions(RockboxUtility PRIVATE
|
||||
QT_DEPRECATED_WARNINGS
|
||||
RBUTIL _LARGEFILE64_SOURCE UNICODE)
|
||||
|
||||
set_property(TARGET RockboxUtility PROPERTY AUTOMOC ON)
|
||||
set_property(TARGET RockboxUtility PROPERTY AUTORCC ON)
|
||||
set_property(TARGET RockboxUtility PROPERTY AUTOUIC ON)
|
||||
|
||||
deploy_qt(RockboxUtility
|
||||
${QT_BINDIR}
|
||||
${CMAKE_CURRENT_LIST_DIR}/../../docs/logo/rockbox-clef.svg
|
||||
${CMAKE_CURRENT_LIST_DIR}/RockboxUtility.desktop
|
||||
${CMAKE_CURRENT_LIST_DIR}/dmgbuild.cfg)
|
||||
|
||||
add_library(rbbase
|
||||
${CMAKE_CURRENT_LIST_DIR}/../../tools/iriver.c
|
||||
${CMAKE_CURRENT_LIST_DIR}/../../tools/iriver.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/../../tools/mkboot.c
|
||||
${CMAKE_CURRENT_LIST_DIR}/../../tools/mkboot.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/../../tools/wavtrim.c
|
||||
${CMAKE_CURRENT_LIST_DIR}/../../tools/wavtrim.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/archiveutil.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/archiveutil.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/autodetection.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/autodetection.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/bootloaderinstallams.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/bootloaderinstallams.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/bootloaderinstallbase.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/bootloaderinstallbase.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/bootloaderinstallbspatch.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/bootloaderinstallbspatch.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/bootloaderinstallchinachip.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/bootloaderinstallchinachip.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/bootloaderinstallfile.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/bootloaderinstallfile.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/bootloaderinstallhelper.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/bootloaderinstallhelper.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/bootloaderinstallhex.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/bootloaderinstallhex.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/bootloaderinstallimx.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/bootloaderinstallimx.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/bootloaderinstallipod.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/bootloaderinstallipod.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/bootloaderinstallmi4.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/bootloaderinstallmi4.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/bootloaderinstallmpio.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/bootloaderinstallmpio.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/bootloaderinstalls5l.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/bootloaderinstalls5l.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/bootloaderinstallsansa.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/bootloaderinstallsansa.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/bootloaderinstalltcc.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/bootloaderinstalltcc.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/encoderbase.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/encoderbase.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/encoderexe.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/encoderexe.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/encoderlame.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/encoderlame.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/encoderrbspeex.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/encoderrbspeex.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/encttssettings.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/encttssettings.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/httpget.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/httpget.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/mspackutil.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/mspackutil.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/progressloggerinterface.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/playerbuildinfo.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/playerbuildinfo.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/rbsettings.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/rbsettings.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/rockboxinfo.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/rockboxinfo.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/system.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/system.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/talkfile.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/talkfile.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/talkgenerator.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/talkgenerator.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/ttsbase.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/ttsbase.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/ttsespeak.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/ttsespeakng.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/ttsexes.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/ttsexes.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/ttsfestival.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/ttsfestival.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/ttsflite.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/ttsmimic.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/ttsmssp.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/ttssapi.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/ttssapi.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/ttssapi4.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/ttsswift.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/uninstall.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/uninstall.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/utils.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/utils.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/voicefile.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/voicefile.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/zipinstaller.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/zipinstaller.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/ziputil.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/ziputil.h
|
||||
)
|
||||
|
||||
if(APPLE)
|
||||
target_sources(rbbase PRIVATE
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/ttscarbon.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/base/ttscarbon.h)
|
||||
endif()
|
||||
|
||||
target_link_libraries(rbbase
|
||||
cutelogger quazip mspack bspatch rbspeex voicefont
|
||||
sansapatcher ipodpatcher chinachippatcher
|
||||
mkamsboot mkimxboot mkmpioboot mktccboot mks5lboot
|
||||
Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Network)
|
||||
target_include_directories(rbbase PUBLIC ${CMAKE_CURRENT_LIST_DIR}/base)
|
||||
target_include_directories(rbbase PRIVATE ${CMAKE_CURRENT_LIST_DIR})
|
||||
target_include_directories(rbbase PUBLIC ${CMAKE_CURRENT_LIST_DIR}/../../tools)
|
||||
target_compile_definitions(rbbase PUBLIC RBUTIL _LARGEFILE64_SOURCE UNICODE)
|
||||
target_compile_definitions(rbbase PRIVATE QT_DEPRECATED_WARNINGS)
|
||||
if(WIN32)
|
||||
target_link_libraries(rbbase setupapi ws2_32 netapi32 crypt32 iphlpapi)
|
||||
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
|
||||
target_link_libraries(rbbase PkgConfig::libusb)
|
||||
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")
|
||||
target_link_libraries(rbbase ${FRAMEWORK_IOKIT} ${FRAMEWORK_COREFOUNDATION}
|
||||
${FRAMEWORK_CARBON} ${FRAMEWORK_SYSTEMCONFIGURATION} ${FRAMEWORK_CORESERVICES})
|
||||
endif()
|
||||
set_property(TARGET rbbase PROPERTY AUTOMOC ON)
|
||||
|
||||
# TODO: Upstream has cmake support, use that instead.
|
||||
add_library(cutelogger)
|
||||
# need to put those separate, otherwise cmake will not add them correctly -- seems to be related to moc'ing.
|
||||
target_sources(cutelogger PUBLIC
|
||||
${CMAKE_CURRENT_LIST_DIR}/logger/include/AbstractAppender.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/logger/include/AbstractStringAppender.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/logger/include/ConsoleAppender.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/logger/include/CuteLogger_global.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/logger/include/FileAppender.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/logger/include/Logger.h
|
||||
#${CMAKE_CURRENT_LIST_DIR}/logger/include/OutputDebugAppender.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/logger/src/AbstractAppender.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/logger/src/AbstractStringAppender.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/logger/src/ConsoleAppender.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/logger/src/FileAppender.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/logger/src/Logger.cpp
|
||||
#${CMAKE_CURRENT_LIST_DIR}/logger/src/OutputDebugAppender.cpp
|
||||
)
|
||||
target_include_directories(cutelogger PUBLIC ${CMAKE_CURRENT_LIST_DIR}/logger/include)
|
||||
target_link_libraries(cutelogger PUBLIC Qt${QT_VERSION_MAJOR}::Core)
|
||||
target_compile_definitions(cutelogger PUBLIC CUTELOGGER_STATIC)
|
||||
set_property(TARGET cutelogger PROPERTY AUTOMOC ON)
|
||||
|
||||
# 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)
|
||||
|
||||
add_library(mspack
|
||||
mspack/cabc.c
|
||||
mspack/cabd.c
|
||||
mspack/cab.h
|
||||
#mspack/chmc.c
|
||||
#mspack/chmd.c
|
||||
#mspack/chm.h
|
||||
mspack/des.h
|
||||
#mspack/hlpc.c
|
||||
#mspack/hlpd.c
|
||||
#mspack/hlp.h
|
||||
#mspack/kwajc.c
|
||||
#mspack/kwajd.c
|
||||
#mspack/kwaj.h
|
||||
#mspack/litc.c
|
||||
#mspack/litd.c
|
||||
#mspack/lit.h
|
||||
#mspack/lzssd.c
|
||||
#mspack/lzss.h
|
||||
mspack/lzxc.c
|
||||
mspack/lzxd.c
|
||||
mspack/lzx.h
|
||||
mspack/mspack.h
|
||||
mspack/mszipc.c
|
||||
mspack/mszipd.c
|
||||
mspack/mszip.h
|
||||
mspack/qtmd.c
|
||||
mspack/qtm.h
|
||||
mspack/readbits.h
|
||||
mspack/readhuff.h
|
||||
mspack/sha.h
|
||||
mspack/system-mspack.c
|
||||
mspack/system-mspack.h
|
||||
#mspack/szddc.c
|
||||
#mspack/szddd.c
|
||||
#mspack/szdd.h
|
||||
)
|
||||
|
||||
target_include_directories(mspack PUBLIC ${CMAKE_CURRENT_LIST_DIR}/mspack)
|
||||
|
||||
|
||||
# Unit tests
|
||||
add_executable(test_compareversion
|
||||
base/utils.cpp
|
||||
base/utils.h
|
||||
test/stubs/stubs-compareversion.cpp
|
||||
test/test-compareversion.cpp)
|
||||
|
||||
target_link_libraries(test_compareversion Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Test)
|
||||
target_compile_definitions(test_compareversion PRIVATE UNICODE)
|
||||
if(APPLE)
|
||||
target_link_libraries(test_compareversion ${FRAMEWORK_IOKIT} ${FRAMEWORK_COREFOUNDATION}
|
||||
${FRAMEWORK_CARBON} ${FRAMEWORK_SYSTEMCONFIGURATION} ${FRAMEWORK_CORESERVICES})
|
||||
endif()
|
||||
target_include_directories(test_compareversion PRIVATE base test/stubs)
|
||||
add_test(test_compareversion test_compareversion)
|
||||
set_property(TARGET test_compareversion PROPERTY AUTOMOC ON)
|
||||
|
||||
add_executable(test_httpget
|
||||
test/test-httpget.cpp
|
||||
base/httpget.cpp
|
||||
base/httpget.h)
|
||||
target_link_libraries(test_httpget Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Test Qt${QT_VERSION_MAJOR}::Network)
|
||||
target_include_directories(test_httpget PRIVATE base test/stubs)
|
||||
add_test(test_httpget test_httpget)
|
||||
set_property(TARGET test_httpget PROPERTY AUTOMOC ON)
|
||||
|
||||
add_executable(test_playerbuildinfo
|
||||
base/playerbuildinfo.cpp
|
||||
base/playerbuildinfo.h
|
||||
base/rbsettings.h
|
||||
base/rockboxinfo.h
|
||||
rbutilqt.qrc # needed for rbutil.ini resource.
|
||||
test/stubs/stubs-playerbuildinfo.cpp
|
||||
test/test-playerbuildinfo.cpp)
|
||||
target_link_libraries(test_playerbuildinfo Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Test)
|
||||
target_include_directories(test_playerbuildinfo PRIVATE base test/stubs)
|
||||
add_test(test_playerbuildinfo test_playerbuildinfo)
|
||||
set_property(TARGET test_playerbuildinfo PROPERTY AUTOMOC ON)
|
||||
set_property(TARGET test_playerbuildinfo PROPERTY AUTORCC ON)
|
||||
|
||||
add_executable(test_rockboxinfo
|
||||
base/rockboxinfo.cpp
|
||||
base/rockboxinfo.h
|
||||
test/test-rockboxinfo.cpp)
|
||||
|
||||
target_link_libraries(test_rockboxinfo Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Test)
|
||||
target_include_directories(test_rockboxinfo PRIVATE base test/stubs)
|
||||
target_compile_definitions(test_rockboxinfo PRIVATE UNICODE)
|
||||
add_test(test_rockboxinfo test_rockboxinfo)
|
||||
set_property(TARGET test_rockboxinfo PROPERTY AUTOMOC ON)
|
||||
|
||||
|
Loading…
Reference in a new issue