Don't use check_cxx_source_runs when cross-compiling

This commit is contained in:
Jonas Kvinge
2019-07-31 23:06:59 +02:00
parent 99569081c9
commit 93f33615ad

View File

@@ -361,10 +361,10 @@ endif()
# Check that we have sqlite3 with FTS5 # Check that we have sqlite3 with FTS5
set(CMAKE_REQUIRED_LIBRARIES ${Qt5Core_LIBRARIES} ${Qt5Sql_LIBRARIES}) if(NOT CMAKE_CROSSCOMPILING)
set(CMAKE_REQUIRED_INCLUDES ${Qt5Core_INCLUDE_DIRS} ${Qt5Sql_INCLUDE_DIRS}) set(CMAKE_REQUIRED_LIBRARIES ${Qt5Core_LIBRARIES} ${Qt5Sql_LIBRARIES})
set(CMAKE_REQUIRED_INCLUDES ${Qt5Core_INCLUDE_DIRS} ${Qt5Sql_INCLUDE_DIRS})
check_cxx_source_runs(" check_cxx_source_runs("
#include <QSqlDatabase> #include <QSqlDatabase>
#include <QSqlQuery> #include <QSqlQuery>
int main() { int main() {
@@ -377,7 +377,8 @@ check_cxx_source_runs("
} }
" "
SQLITE3_FTS5 SQLITE3_FTS5
) )
endif()
if(HAVE_XINE) if(HAVE_XINE)
check_cxx_source_compiles(" check_cxx_source_compiles("