mirror of
https://github.com/strawberrymusicplayer/strawberry
synced 2024-12-27 08:43:01 +01:00
Fix compile without built-in qsqlite
This commit is contained in:
parent
0af0af2415
commit
99868323d7
@ -282,14 +282,16 @@ list(REMOVE_ITEM QT_LIBRARIES "-lGLU -lGL")
|
||||
# QSqlLiteDriver:
|
||||
# We do this because we can't guarantee that the driver shipped with Qt exposes the raw sqlite3 functions required for FTS support.
|
||||
# This way we know that those symbols exist at compile-time and that our code links to the same sqlite library as the Qt driver.
|
||||
option(USE_SYSTEM_QSQLITE "Don't set this unless you can guarantee that the driver shipped with Qt exposes the raw sqlite3 functions required for FTS support" OFF)
|
||||
option(USE_SYSTEM_QSQLITE "Don't set this unless you can guarantee that the driver shipped with Qt exposes the raw sqlite3 functions required for FTS support" ON)
|
||||
if(USE_SYSTEM_QSQLITE)
|
||||
message(STATUS "Using system qsqlite driver")
|
||||
set(USE_SYSTEM_QSQLITE ON)
|
||||
else(USE_SYSTEM_QSQLITE)
|
||||
message(STATUS "Using builtin qsqlite driver")
|
||||
add_subdirectory(3rdparty/qsqlite)
|
||||
set(QSQLITE_LIBRARIES qsqlite)
|
||||
set(QSQLITE_INCLUDE_DIRS "3rdparty/qsqlite")
|
||||
set(USE_SYSTEM_QSQLITE OFF)
|
||||
endif(USE_SYSTEM_QSQLITE)
|
||||
|
||||
# When/if upstream accepts our patches then these options can be used to link to system installed qtsingleapplication instead.
|
||||
|
@ -853,6 +853,7 @@ target_link_libraries(strawberry_lib
|
||||
${QTSINGLEAPPLICATION_LIBRARIES}
|
||||
${CMAKE_THREAD_LIBS_INIT}
|
||||
${SQLITE_LIBRARIES}
|
||||
${QSQLITE_LIBRARIES}
|
||||
z
|
||||
Qocoa
|
||||
)
|
||||
@ -891,10 +892,6 @@ if(HAVE_LIBMTP)
|
||||
target_link_libraries(strawberry_lib ${LIBMTP_LIBRARIES})
|
||||
endif(HAVE_LIBMTP)
|
||||
|
||||
#if(HAVE_LIBINDICATE)
|
||||
# target_link_libraries(strawberry_lib ${INDICATEQT_LIBRARIES})
|
||||
#endif(HAVE_LIBINDICATE)
|
||||
|
||||
if(HAVE_LIBPULSE)
|
||||
target_link_libraries(strawberry_lib ${LIBPULSE_LIBRARIES})
|
||||
endif()
|
||||
@ -918,8 +915,6 @@ else (APPLE)
|
||||
target_link_libraries(strawberry_lib ${QXT_LIBRARIES})
|
||||
endif (APPLE)
|
||||
|
||||
target_link_libraries(strawberry_lib qsqlite)
|
||||
|
||||
if (WIN32)
|
||||
target_link_libraries(strawberry_lib
|
||||
${ZLIB_LIBRARIES}
|
||||
|
@ -38,6 +38,7 @@
|
||||
#cmakedefine TAGLIB_HAS_OPUS
|
||||
#cmakedefine USE_INSTALL_PREFIX
|
||||
#cmakedefine USE_SYSTEM_SHA2
|
||||
#cmakedefine USE_SYSTEM_QSQLITE
|
||||
|
||||
#cmakedefine HAVE_GSTREAMER
|
||||
#cmakedefine HAVE_VLC
|
||||
|
@ -82,8 +82,10 @@
|
||||
#endif
|
||||
|
||||
// Load sqlite plugin on windows and mac.
|
||||
#ifndef USE_SYSTEM_QSQLITE
|
||||
#include <QtPlugin>
|
||||
Q_IMPORT_PLUGIN(QSQLiteDriverPlugin)
|
||||
#endif
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user