linux – 使用autogen.sh和ExternalProject_Add
作者:互联网
我尝试在CMakeLists.txt中设置ExternalProject_Add,
为此,我发现了这个问题:
What is the correct usage of CMake EXTERNALPROJECT_ADD with a Git repository?
但我有一个问题,我不能调用CONFIGURE_COMMAND配置,因为我必须调用./autogen.sh来生成configure.ac.
我没有找到如何让cmake运行./autogen.sh
解决方法:
从documentation开始关于ExternalProject:
Any builtin step that specifies a
<step>_COMMAND cmd...
or custom step that specifies aCOMMAND cmd...
may specify additional command lines using the formCOMMAND cmd...
. At build time the commands will be executed in order and aborted if any one fails.
您可以指定在外部项目的配置步骤中执行的几个命令:
ExternalProject_Add(<some_project>
...
CONFIGURE_COMMAND ./autogen.sh COMMAND ./configure
)
标签:linux,cmake,configure,external-project,autogen 来源: https://codeday.me/bug/20190727/1555411.html