Support #6907
closedcreate a new Projekt
0%
Description
I want to create a new project which is CMakeLists.Txt the right one if I want to use dbo. I can only use DBO in project WT. Everything works there. Is WT always the basis of a new project. What do I do?
Have anyone a CMakelIsts.txt for a new Projekt with DBO.
Files
Updated by Roel Standaert about 5 years ago
- File CMakeLists.txt CMakeLists.txt added
- Tracker changed from Bug to Support
I assume you installed Wt somewhere?
Wt exports its targets when it installs. This means you can just use find_package
. I attached a little CMakeLists.txt
that finds the Dbo
and DboSqlite3
components inside of the Wt package, and links an executable called mywtdbo
with them.
If Wt is installed in a non-standard location, you may need to supply the Wt_DIR
argument to CMake, like: -DWt_DIR=/path/to/wt/lib/cmake/wt
. This would not add the proper include path, though. I just pushed a fix for that. Otherwise, a quick fix would be to also require the Wt component and link with Wt::Wt (the linker will realize it doesn't need to actually link with Wt itself, but this makes sure the right include path is added).
Updated by Roel Standaert over 4 years ago
- Status changed from Feedback to Closed
I'm closing this due to inactivity. I hope my explanation was of some help.