使用 autogen.sh 和 ExternalProject_Add
using autogen.sh with ExternalProject_Add
我尝试在CMakeLists.txt、
中设置ExternalProject_Add
为此我发现了这个问题:
What is the correct usage of CMake EXTERNALPROJECT_ADD with a Git repository?
但是我有一个问题,我不能调用CONFIGURE_COMMAND configure
,因为我必须调用./autogen.sh
来生成configure.ac
。
我找不到如何让 cmake 运行 ./autogen.sh
从 documentation 关于 ExternalProject
:
Any builtin step that specifies a <step>_COMMAND cmd...
or custom step that specifies a COMMAND cmd...
may specify additional command lines using the form COMMAND 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
)
我尝试在CMakeLists.txt、
中设置ExternalProject_Add为此我发现了这个问题:
What is the correct usage of CMake EXTERNALPROJECT_ADD with a Git repository?
但是我有一个问题,我不能调用CONFIGURE_COMMAND configure
,因为我必须调用./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
)