Timeline for How to use CMake for multi-component QT project
Current License: CC BY-SA 4.0
Post Revisions
19 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jan 19, 2024 at 6:49 | answer | added | Hakan Kaya | timeline score: 0 | |
| Jan 18, 2024 at 7:40 | comment | added | Евгений Дружинин | @pptaszni sorry you are right ../../dockwidgets/dockwidget.h path was provided of my collegue. I changed to ui/components/dockwidgets/dockwidget.h and all works | |
| Jan 18, 2024 at 6:52 | comment | added | pptaszni |
It looks like ../../dockwidgets/dockwidget.h path is provided by you. So again, target_include_directories, organize and link your targets correctly, then provide good include path, like #include "dockwidgets/dockwidget.h". Can't tell more, because question is incomplete (e.g. missing CMakeLists from subdirs). Also don't post pictures of code, in QT *.ui are normal text files (sometimes big, so you can cut irrelevant parts).
|
|
| Jan 18, 2024 at 5:59 | history | edited | Евгений Дружинин | CC BY-SA 4.0 |
edited title
|
| Jan 18, 2024 at 5:53 | history | edited | Евгений Дружинин | CC BY-SA 4.0 |
added 87 characters in body
|
| Jan 18, 2024 at 5:52 | comment | added | Евгений Дружинин | @pptaszni #include "../../whatever.h" generated by qt MOC I just point where located whatever.h. I attached picture. | |
| Jan 18, 2024 at 5:46 | history | edited | Евгений Дружинин | CC BY-SA 4.0 |
Change header of question
|
| Jan 17, 2024 at 16:12 | review | Close votes | |||
| Jan 22, 2024 at 0:07 | |||||
| Jan 17, 2024 at 16:02 | comment | added | hyde | @pptaszni It's a Qt5 project, and the file contains several Qt specific lines, so Qt tag is appropriate. | |
| Jan 17, 2024 at 15:54 | comment | added | pptaszni |
And never #include "../../whatever.h"
|
|
| Jan 17, 2024 at 15:53 | comment | added | pptaszni |
It seems to have nothing to do with QT. You could as well ask "how to use CMake for multi-component project". Read about add_library, target_include_directories, target_link_libraries. Some example: github.com/ttroy50/cmake-examples/tree/master/02-sub-projects
|
|
| Jan 17, 2024 at 15:11 | review | Close votes | |||
| Jan 17, 2024 at 16:04 | |||||
| Jan 17, 2024 at 15:00 | comment | added | Евгений Дружинин | @hyde I have added CMakeLists.txt | |
| Jan 17, 2024 at 14:59 | history | edited | Евгений Дружинин | CC BY-SA 4.0 |
Added CMakeLists.txt
|
| Jan 17, 2024 at 14:52 | comment | added | hyde | There is some mistake in your CMakelists.txt, most likely. | |
| Jan 17, 2024 at 14:09 | comment | added | Евгений Дружинин | @drescherjm I added structure of project | |
| Jan 17, 2024 at 14:08 | history | edited | Евгений Дружинин | CC BY-SA 4.0 |
Added structure of project
|
| Jan 17, 2024 at 13:55 | comment | added | drescherjm | You can have your headers in different folders. In my Qt code at work I have around a dozen libraries which each have their own include directory. | |
| Jan 17, 2024 at 13:44 | history | asked | Евгений Дружинин | CC BY-SA 4.0 |