How to build "subdirs" project using xxx.txt ?
-
My first exposure to xxx.txt , I am busy RTFM , I am not done reading it all , and cannot figure out how to build "subdirs" project. It looks as the "old" .pro ways won't work.
Is there an example how to build "subdirs" using xxx.txt files?
It would sure help. -
My first exposure to xxx.txt , I am busy RTFM , I am not done reading it all , and cannot figure out how to build "subdirs" project. It looks as the "old" .pro ways won't work.
Is there an example how to build "subdirs" using xxx.txt files?
It would sure help.@AnneRanch said in How to build "subdirs" project using xxx.txt ?:
Is there an example how to build "subdirs" using xxx.txt files?
I imagine this means
CMakeLists.txt
.
There is no project-type in CMake, it's more flexible, you can mix-and-match in the same file. In any case you can simply useadd_subdirectory(NameOfSubdirectory)
to include a subdirectory containing its ownCMakeLists.txt
P.S.
Note that you can't mixCMakeLists.txt
with*.pro
files in the same project -
@AnneRanch said in How to build "subdirs" project using xxx.txt ?:
Is there an example how to build "subdirs" using xxx.txt files?
I imagine this means
CMakeLists.txt
.
There is no project-type in CMake, it's more flexible, you can mix-and-match in the same file. In any case you can simply useadd_subdirectory(NameOfSubdirectory)
to include a subdirectory containing its ownCMakeLists.txt
P.S.
Note that you can't mixCMakeLists.txt
with*.pro
files in the same project@VRonin Nice - so my entire project based on .pro down the toilet... So where is the QT menu option to "add_directory " , or do I have to add it in CMakeLists.txt? If so hope I can find it in documentation.
-
@AnneRanch said in How to build "subdirs" project using xxx.txt ?:
Nice - so my entire project based on .pro down the toilet...
Of course not. You can use qmake or you can use cmake; your choice. The source code is not magically going to vanish because you choose to change the utility that orchestrates building the project.
-
@VRonin Nice - so my entire project based on .pro down the toilet... So where is the QT menu option to "add_directory " , or do I have to add it in CMakeLists.txt? If so hope I can find it in documentation.
@AnneRanch said in How to build "subdirs" project using xxx.txt ?:
So where is the QT menu option to "add_directory " , or do I have to add it in CMakeLists.txt
CMake is a lot more flexible than .pro files, there are multiple ways to do the same thing and this makes it difficult to automate. This means Qt Creator has no "menu options" to do stuff, you actually have to edit the CMakeLists.txt manually. You can use this project as an example of a subdir + test project
-
@AnneRanch said in How to build "subdirs" project using xxx.txt ?:
So where is the QT menu option to "add_directory " , or do I have to add it in CMakeLists.txt
CMake is a lot more flexible than .pro files, there are multiple ways to do the same thing and this makes it difficult to automate. This means Qt Creator has no "menu options" to do stuff, you actually have to edit the CMakeLists.txt manually. You can use this project as an example of a subdir + test project
@VRonin Thank you - that is exactly what I need to "switch" to cmake. I was not aware that there is cmake. Appreciate your help.
SOLVED CASE CLOSED