This is a very specific problem to which I put up the solution for those of you googling for it.
To save you some time: the “Data” namespace in Poco has been renamed to “SQL” in POCO 1.9.1. This can take shape in the following errors, in case you search for them:
CMake Find Error
When compiling your existing project, you may run into the following error after compiling POCO:
> cmake .. -DCMAKE_INSTALL_PREFIX=C:\local -A x64 CMake Error at [...]/cmake/PocoConfig.cmake:29 (find_package): Could not find a package configuration file provided by "PocoData" with any of the following names: PocoDataConfig.cmake pocodata-config.cmake Add the installation prefix of "PocoData" to CMAKE_PREFIX_PATH or set "PocoData_DIR" to a directory containing one of the above files. If "PocoData" provides a separate development package or SDK, be sure it has been installed. Call Stack (most recent call first): CMakeLists.txt:28 (find_package) -- Configuring incomplete, errors occurred! See also "[...]/CMakeFiles/CMakeOutput.log".
Make sure to compile POCO with
<DB> is one of the
databases you’d like to use, e.g.
You then need to make sure to change the name of the component in the
+ find_package(POCO REQUIRED Data DataSQLite) - find_package(POCO REQUIRED SQL SQLSQLite)
Missing CMake Target
You will get this as a followup:
CMake Error at src/CMakeLists.txt:3 (add_library): Target "[...]" links to target "Poco::DataSQLite" but the target was not found. Perhaps a find_package() call is missing for an IMPORTED target, or an ALIAS target is missing?
Change all occurances of
Poco::DataSQLite cmake target to
target_link_library calls analog to the
The followup error is a compile error:
[...]: error C2039: 'Data': is not a member of 'Poco' [...]
Hence, now you need to refactor all uses of the
Data namespace to
Hope this saved you a minute!
Written in 30 minutes.