mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-08 15:16:34 +02:00
Add FindSqlite and use its values
This commit is contained in:
@@ -136,6 +136,9 @@ macro_log_feature(QTWEETLIB_FOUND "QTweetLib" "Qt Twitter Library" "https://gith
|
|||||||
macro_optional_find_package(LibLastFm 1.0.0)
|
macro_optional_find_package(LibLastFm 1.0.0)
|
||||||
macro_log_feature(LIBLASTFM_FOUND "liblastfm" "Qt library for the Last.fm webservices" "https://github.com/eartle/liblastfm" TRUE "" "liblastfm is needed for scrobbling tracks to Last.fm and fetching cover artwork")
|
macro_log_feature(LIBLASTFM_FOUND "liblastfm" "Qt library for the Last.fm webservices" "https://github.com/eartle/liblastfm" TRUE "" "liblastfm is needed for scrobbling tracks to Last.fm and fetching cover artwork")
|
||||||
|
|
||||||
|
macro_optional_find_package(Sqlite)
|
||||||
|
macro_log_feature(SQLITE_FOUND "SQLite" "Provides a SQL database in a C library" "http://www.sqlite.org" TRUE "" "sqlite is needed for our forked QSQLite driver, since 4.8.2 screws it up")
|
||||||
|
|
||||||
#### submodules start
|
#### submodules start
|
||||||
# automatically init submodules here, don't delete this code we may add submodules again
|
# automatically init submodules here, don't delete this code we may add submodules again
|
||||||
|
|
||||||
|
50
CMakeModules/FindSqlite.cmake
Normal file
50
CMakeModules/FindSqlite.cmake
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
# - Try to find Sqlite
|
||||||
|
# Once done this will define
|
||||||
|
#
|
||||||
|
# SQLITE_FOUND - system has Sqlite
|
||||||
|
# SQLITE_INCLUDE_DIR - the Sqlite include directory
|
||||||
|
# SQLITE_LIBRARIES - Link these to use Sqlite
|
||||||
|
# SQLITE_DEFINITIONS - Compiler switches required for using Sqlite
|
||||||
|
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||||
|
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
# Copyright (c) 2008, Gilles Caulier, <caulier.gilles@gmail.com>
|
||||||
|
#
|
||||||
|
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||||
|
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
||||||
|
|
||||||
|
if ( SQLITE_INCLUDE_DIR AND SQLITE_LIBRARIES )
|
||||||
|
# in cache already
|
||||||
|
SET(Sqlite_FIND_QUIETLY TRUE)
|
||||||
|
endif ( SQLITE_INCLUDE_DIR AND SQLITE_LIBRARIES )
|
||||||
|
|
||||||
|
# use pkg-config to get the directories and then use these values
|
||||||
|
# in the FIND_PATH() and FIND_LIBRARY() calls
|
||||||
|
if( NOT WIN32 )
|
||||||
|
find_package(PkgConfig)
|
||||||
|
|
||||||
|
pkg_check_modules(PC_SQLITE QUIET sqlite3)
|
||||||
|
|
||||||
|
set(SQLITE_DEFINITIONS ${PC_SQLITE_CFLAGS_OTHER})
|
||||||
|
endif( NOT WIN32 )
|
||||||
|
|
||||||
|
find_path(SQLITE_INCLUDE_DIR NAMES sqlite3.h
|
||||||
|
PATHS
|
||||||
|
${PC_SQLITE_INCLUDEDIR}
|
||||||
|
${PC_SQLITE_INCLUDE_DIRS}
|
||||||
|
)
|
||||||
|
|
||||||
|
find_library(SQLITE_LIBRARIES NAMES sqlite3
|
||||||
|
PATHS
|
||||||
|
${PC_SQLITE_LIBDIR}
|
||||||
|
${PC_SQLITE_LIBRARY_DIRS}
|
||||||
|
)
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(Sqlite DEFAULT_MSG SQLITE_INCLUDE_DIR SQLITE_LIBRARIES )
|
||||||
|
|
||||||
|
# show the SQLITE_INCLUDE_DIR and SQLITE_LIBRARIES variables only in the advanced view
|
||||||
|
mark_as_advanced(SQLITE_INCLUDE_DIR SQLITE_LIBRARIES )
|
||||||
|
|
@@ -336,6 +336,7 @@ include_directories( . ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/.
|
|||||||
${LIBLASTFM_INCLUDE_DIRS}/..
|
${LIBLASTFM_INCLUDE_DIRS}/..
|
||||||
${CLUCENE_INCLUDE_DIRS}
|
${CLUCENE_INCLUDE_DIRS}
|
||||||
${PHONON_INCLUDES}
|
${PHONON_INCLUDES}
|
||||||
|
${SQLITE_INCLUDE_DIR}
|
||||||
|
|
||||||
playlist
|
playlist
|
||||||
|
|
||||||
@@ -437,8 +438,6 @@ TARGET_LINK_LIBRARIES( tomahawklib
|
|||||||
# Thirdparty shipped with tomahawk
|
# Thirdparty shipped with tomahawk
|
||||||
${LIBPORTFWD_LIBRARIES}
|
${LIBPORTFWD_LIBRARIES}
|
||||||
|
|
||||||
sqlite3
|
|
||||||
|
|
||||||
# External deps
|
# External deps
|
||||||
${QJSON_LIBRARIES}
|
${QJSON_LIBRARIES}
|
||||||
${PHONON_LIBS}
|
${PHONON_LIBS}
|
||||||
@@ -457,6 +456,7 @@ TARGET_LINK_LIBRARIES( tomahawklib
|
|||||||
${CMAKE_THREAD_LIBS_INIT}
|
${CMAKE_THREAD_LIBS_INIT}
|
||||||
${LINK_LIBRARIES}
|
${LINK_LIBRARIES}
|
||||||
${Boost_LIBRARIES}
|
${Boost_LIBRARIES}
|
||||||
|
${SQLITE_LIBRARIES}
|
||||||
)
|
)
|
||||||
|
|
||||||
INSTALL( TARGETS tomahawklib
|
INSTALL( TARGETS tomahawklib
|
||||||
|
Reference in New Issue
Block a user