diff --git a/3rdparty/sqlite3/CMakeLists.txt b/3rdparty/sqlite3/CMakeLists.txt index 8ddae70e3..5fa7ad37e 100644 --- a/3rdparty/sqlite3/CMakeLists.txt +++ b/3rdparty/sqlite3/CMakeLists.txt @@ -1,5 +1,5 @@ -add_definitions(-DSQLITE_OMIT_LOAD_EXTENSION) -add_definitions(-DNDEBUG) -add_library(fgsqlite3 sqlite3.c) +add_library(fgsqlite3 STATIC sqlite3.c) + +target_compile_definitions(fgsqlite3 PRIVATE "SQLITE_OMIT_LOAD_EXTENSION NDEBUG") set_target_properties(fgsqlite3 PROPERTIES COMPILE_FLAGS "-fpic -fno-fast-math") diff --git a/CMakeLists.txt b/CMakeLists.txt index ce3b7bddf..657e9ece4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -494,9 +494,10 @@ if(WIN32) if(MSVC) # override CMake default RelWithDebInfo flags. This is important to ensure # good performance - set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/MT /Zi /O2 /Ob2 /D NDEBUG") + set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/Zi /O2 /Ob2 /D NDEBUG") + set(CMAKE_C_FLAGS_RELWITHDEBINFO "/Zi /O2 /Ob2 /D NDEBUG") - set(MSVC_FLAGS "-DNOMINMAX -D_USE_MATH_DEFINES -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS -D__CRT_NONSTDC_NO_WARNINGS /MP /O2") + set(MSVC_FLAGS "-DNOMINMAX -D_USE_MATH_DEFINES -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS -D__CRT_NONSTDC_NO_WARNINGS") if(ENABLE_SIMD) if (X86) SET(CMAKE_C_FLAGS_RELEASE "/O2 /arch:SSE /arch:SSE2")