开发者

Dynamically add subdir in a Qt Project File?

开发者 https://www.devze.com 2023-04-09 13:08 出处:网络
I need to dynamically add folders into $SUBDIRS , just scan for some folders , and: 开发者_如何学编程for file in plugin_dir

I need to dynamically add folders into $SUBDIRS , just scan for some folders , and:

开发者_如何学编程
for file in plugin_dir
   if folder name ~ "^plugin-[A-Z]+$"
      SUBDIRS += $name
   fi

But how can i implement this in a .pro file ?


We do this by using qmake's system command.

Where we need non-trivial commands to be run, we write a script (we use Python, but any language would do) that we pass info into via command-line options, and that writes out the desired values we want out into a qmake variable.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号