3

I'm compiling a CMake-based project (SOCI to be specific), that depends on SQLite. This being Windows, there are no standard paths for the project to look into, so it can't find SQLite, and I get this when configuring:

SQLite3 not found, some libraries or features will be disabled. 
See the documentation for SQLite3 or manually set these variables: 
SQLITE3_INCLUDE_DIR                      = SQLITE3_INCLUDE_DIR-NOTFOUND 
SQLITE3_LIBRARIES                        = SQLITE3_LIBRARY-NOTFOUND 

The SQLite lib and header files are at

c:\Workspace\SQLite\Release\SQLite.lib
c:\Workspace\SQLite\SQLite\sqlite3.h
c:\Workspace\SQLite\SQLite\sqlite3ext.h

Is it possible to tell CMake GUI where they are so it can find them?

Note: I'm talking about the GUI, not the command line. This is what the GUI looks like:

enter image description here

sashoalm
  • 75,001
  • 122
  • 434
  • 781

1 Answers1

4

Try "Add Entry" button, it is equivalent to -D option how to add cache entry

Peter Petrik
  • 9,701
  • 5
  • 41
  • 65
  • Hm, I tried it, but for some reason it still can't find SQLite, it says now `SQLITE3_LIBRARIES = c:\Workspace\SQLite\Release SQLITE3_LIBRARY-NOTFOUND`. Same for `SQLITE3_INCLUDE_DIR`. – sashoalm Jan 31 '14 at 10:16
  • http://stackoverflow.com/questions/15856445/cmake-find-sqlite3-library-on-windows – Peter Petrik Jan 31 '14 at 10:39
  • Maybe you have to specify SQLITE3_LIBRARY_RELEASE directory and not specify SQLITE3_LIBRARIES. Please check documentation for your FindSqlite3 module – Peter Petrik Jan 31 '14 at 10:42
  • OK thanks. Anyway, I'm marking your answer as correct because it is the correct way to set library paths in general. – sashoalm Jan 31 '14 at 12:21
  • 2
    I managed to 'force' it to work by copying the headers and lib to `C:\Windows\` eventually. CMake finds them there. – sashoalm Jan 31 '14 at 12:58