CMake 可以生成配置文件吗?
问题描述
我需要将配置文件从 C++ 转换为 JS,我正在尝试在项目中使用 emscripten.Emscripten 自带一个叫做 emconfigure 的工具,它取代了 autoconf 配置,
I need the configure file to transpile from C++ to JS, I'm trying to use emscripten in a project. Emscripten comes with a tool called emconfigure, that replaces the autoconf configure,
但是我正在构建的项目使用 cmake 作为构建系统,目前(1 月 12 日)emscripten 仅支持 autoconf - 所以我通过生成配置并在 make 上做一个端口来绕过它,所以有一个从 cmake 创建配置文件的方法?我不是在谈论 make 文件……而是在谈论配置文件本身.
But the project I'm building uses cmake as build system and currently (Jan-12) emscripten has only support for autoconf - so I'm bypassing it by generating the configure and doing a port on the make, so there a way to create the configure file from the cmake ?? I'm not talking about the make files.. but the configure file itself.
推荐答案
是的,它可以:
示例.h.in
在您的 cmake 文件中:
配置的Example.h
:
文档:
- CMake 3.0
- CMake 2.8.12
这篇关于CMake 可以生成配置文件吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!