Domanda

I have create qt project and I have in project.pro file added new files and folders adn it compiles and works. I have external two directories with source code files and own CMakeLists.txt files and I need to add to qt project. How to add this ?

(I have tried to create to .so files and copy into /usr/local/lib and add to PATH and in project.pro I have added LIBS+= /usr/local/lib. How to make project.pro uses make files for those two directory (to avoid to manually add every to project.pro)

È stato utile?

Soluzione

You could the following qmake function to run the cmake and etc. processes for you:

system(command)

Executes the given command in a secondary shell. Succeeds if the command returns with a zero exit status; otherwise fails. You can check the return value of this function using a scope.

For example:

system(ls /bin):HAS_BIN=FALSE

See also the replace variant of system().

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top