mirror of
https://github.com/clementine-player/Clementine
synced 2025-01-31 03:27:40 +01:00
Compile with a static sqlite by default, since Qt 4.7 doesn't seem to expose the symbols we need to use FTS
This commit is contained in:
parent
ae62ab61f6
commit
5d984cb368
@ -148,20 +148,9 @@ if(ENABLE_VISUALISATIONS)
|
||||
endif(USE_SYSTEM_PROJECTM)
|
||||
endif(ENABLE_VISUALISATIONS)
|
||||
|
||||
# Test whether libsqlite3 is available and if FTS3 is enabled in it
|
||||
if(WIN32 OR APPLE)
|
||||
option(STATIC_SQLITE "Compile and use a static sqlite3 library" ON)
|
||||
else(WIN32 OR APPLE)
|
||||
try_run(FTS_TEST_RUN FTS_TEST_COMPILE
|
||||
${CMAKE_CURRENT_BINARY_DIR}/sqlite3_fts_test
|
||||
${CMAKE_SOURCE_DIR}/cmake/sqlite3_fts_test.cpp
|
||||
CMAKE_FLAGS "-DLINK_LIBRARIES:STRING=sqlite3")
|
||||
if(NOT FTS_TEST_COMPILE OR FTS_TEST_RUN EQUAL 1 OR FTS_TEST_RUN STREQUAL "FAILED_TO_RUN")
|
||||
option(STATIC_SQLITE "Compile and use a static sqlite3 library" ON)
|
||||
else(NOT FTS_TEST_COMPILE OR FTS_TEST_RUN EQUAL 1 OR FTS_TEST_RUN STREQUAL "FAILED_TO_RUN")
|
||||
option(STATIC_SQLITE "Compile and use a static sqlite3 library" OFF)
|
||||
endif(NOT FTS_TEST_COMPILE OR FTS_TEST_RUN EQUAL 1 OR FTS_TEST_RUN STREQUAL "FAILED_TO_RUN")
|
||||
endif(WIN32 OR APPLE)
|
||||
# We compile our own qsqlite3 by default now, because in Qt 4.7 the symbols we
|
||||
# need from it are private.
|
||||
option(STATIC_SQLITE "Compile and use a static sqlite3 library" ON)
|
||||
|
||||
set(HAVE_STATIC_SQLITE ${STATIC_SQLITE})
|
||||
if(STATIC_SQLITE)
|
||||
|
@ -1,32 +0,0 @@
|
||||
/* This file is part of Clementine.
|
||||
|
||||
Clementine is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Clementine is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Clementine. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <sqlite3.h>
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
sqlite3* db;
|
||||
|
||||
int ret = sqlite3_open(":memory:", &db);
|
||||
if (ret)
|
||||
return 1;
|
||||
|
||||
char* error = 0;
|
||||
ret = sqlite3_exec(db, "CREATE VIRTUAL TABLE foo USING fts3()", 0, 0, &error);
|
||||
if (ret != SQLITE_OK)
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user