diff --git a/CMakeLists.txt b/CMakeLists.txt
index c32724b..efdb43b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -47,7 +47,12 @@ else (MSVC)
     set(CPPLINT_ARG_OUTPUT      "--output=eclipse")
     set(CPPCHECK_ARG_TEMPLATE   "--template=gcc")
     # Useful compile flags and extra warnings
-    add_compile_options(-fstack-protector -Wall -Wextra -Wpedantic -Wno-long-long -Wswitch-enum -Wshadow -Winline)
+    if (MINGW)
+        MESSAGE ( STATUS "Running on MinGW - no -fstack-protector" )
+        add_compile_options(-Wall -Wextra -Wpedantic -Wno-long-long -Wswitch-enum -Wshadow -Winline)
+    else ()
+        add_compile_options(-fstack-protector -Wall -Wextra -Wpedantic -Wno-long-long -Wswitch-enum -Wshadow -Winline)
+    endif ()
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-c++0x-compat") # C++ only
     if (CMAKE_COMPILER_IS_GNUCXX)
         # GCC flags
@@ -230,6 +235,8 @@ if (SQLITECPP_INTERNAL_SQLITE)
     add_subdirectory(sqlite3)
     target_include_directories(sqlite3 PUBLIC "${PROJECT_SOURCE_DIR}/sqlite3")
     target_include_directories(SQLiteCpp PRIVATE "${PROJECT_SOURCE_DIR}/sqlite3")
+else (SQLITECPP_INTERNAL_SQLITE)
+    target_link_libraries(SQLiteCpp PUBLIC CONAN_PKG::sqlite3)
 endif (SQLITECPP_INTERNAL_SQLITE)
 
 # Optional additional targets:
