diff --git a/src/libs/sqlite/CMakeLists.txt b/src/libs/sqlite/CMakeLists.txt index 07d8aa3299b..6a5dbf39d2c 100644 --- a/src/libs/sqlite/CMakeLists.txt +++ b/src/libs/sqlite/CMakeLists.txt @@ -1,3 +1,11 @@ +set(SQLITE_SOURCES + ../3rdparty/sqlite/sqlite3.c + ../3rdparty/sqlite/sqlite3.h + ../3rdparty/sqlite/carray.c + ../3rdparty/sqlite/config.h + ../3rdparty/sqlite/sqlite.h +) + add_qtc_library(Sqlite PROPERTIES AUTOMOC OFF AUTOUIC OFF PUBLIC_DEFINES @@ -7,11 +15,7 @@ add_qtc_library(Sqlite "${CMAKE_CURRENT_LIST_DIR}" ../3rdparty/sqlite SOURCES - ../3rdparty/sqlite/sqlite3.c - ../3rdparty/sqlite/sqlite3.h - ../3rdparty/sqlite/carray.c - ../3rdparty/sqlite/config.h - ../3rdparty/sqlite/sqlite.h + ${SQLITE_SOURCES} constraints.h createtablesqlstatementbuilder.h lastchangedrowid.h @@ -41,6 +45,17 @@ add_qtc_library(Sqlite sqlitelibraryinitializer.cpp sqlitelibraryinitializer.h ) +if(MSVC) + set(DISABLE_WARNINGS "-W0") +else() + set(DISABLE_WARNINGS "-w") +endif() +set_source_files_properties( + ${SQLITE_SOURCES} + PROPERTIES + COMPILE_OPTIONS ${DISABLE_WARNINGS} +) + extend_qtc_library(Sqlite DEFINES SQLITE_CUSTOM_INCLUDE=config.h) if (APPLE)