FindSqlite: Use CMAKE_FLAGS the right way in try_compile().
Review Request #119762 - Created Aug. 13, 2014 and submitted
|Raphael Kubo da Costa|
This fixes f90774f1 ("Check whether Sqlite is compiled with SQLITE_ENABLE_UNLOCK_NOTIFY"), so that SQLITE_INCLUDE_DIR is really passed to the try_compile() call. So far, it was just a NOP and the compilation only worked if sqlite3.h was in a directory the compiler uses automatically. try_compile()'s syntax is a bit complicated, and CMAKE_FLAGS expects a series of arguments as if they had been passed to the command line, so instead of "CMAKE_FLAGS INCLUDE_DIRECTORIES /some/dir" one needs to use "CMAKE_FLAGS -DINCLUDE_DIRECTORIES:PATH=/some/dir".
SQLite is properly detected when it is in /usr/local.