简体   繁体   English

CMake:制作适用于Windows Mobile的Visual Studio项目

[英]CMake: Making a Visual Studio project for Windows Mobile

so far, my night has been extremely frustrating, trying to learn CMake. 到目前为止,我的夜晚非常沮丧,试图学习CMake。 However, I'm slowly getting there. 但是,我正在慢慢到达那里。 There are a couple of things bugging me though: 不过,有几件事困扰着我:

1) Additional Library Directories 1)其他图书馆目录

I can either have this: 我可以有这个:

CMake: link_directories ("../../YoghurtGum/bin")
Output: AdditionalLibraryDirectories="..\..\YoghurtGum\bin\$(OutDir),..\..\YoghurtGum\bin"

Or this: 或这个:

CMake: link_directories ("${PROJECT_SOURCE_DIR}../../YoghurtGum/bin")
Output: AdditionalLibraryDirectories="F:\Projects\YG3\Tests\Galaxians..\..\YoghurtGum\bin\$(OutDir),F:\Projects\YG3\Tests\Galaxians..\..\YoghurtGum\bin"

Or this: 或这个:

CMake: link_directories ("${PROJECT_SOURCE_DIR}/../../YoghurtGum/bin")
Output: AdditionalLibraryDirectories="..\..\YoghurtGum\bin\$(OutDir),..\..\YoghurtGum\bin"

While what I really want is this: 虽然我真正想要的是:

Output: "..\..\YoghurtGum\bin"

2) Setting the platform name 2)设置平台名称

I haven't been able to set it, but I want it to be Windows Mobile 5.0 Pocket PC SDK (ARMV4I) instead of Win32 . 我尚未进行设置,但我希望它是Windows Mobile 5.0 Pocket PC SDK (ARMV4I)而不是Win32

3) Setting the intermediate directory 3)设置中间目录

I want to have this: 我想要这个:

IntermediateDirectory="intermediate"

instead of this: 代替这个:

IntermediateDirectory="Galaxians.dir\Release"

but nothing seems to work. 但似乎没有任何效果。

4) Output file 4)输出文件

It should be: 它应该是:

OutputFile="$(OutDir)\$(ProjectName)_debug.exe"

instead of: 代替:

OutputFile="F:\Projects\YG3\Tests\Galaxians\bin\Debug\Galaxians.exe"

Any help on any of these issues would be much appreciated. 在这些问题上的任何帮助将不胜感激。

To quote a famous (infamous?) line: 引用著名的(臭名昭著的)话:

"You can't always get what you want."

1) Additional Library Directories 1)其他图书馆目录

2) Setting the platform name 2)设置平台名称

3) Setting the intermediate directory 3)设置中间目录

These are just the way you've observed them. 这些只是您观察它们的方式。 They are as they are, and you cannot change them with an "as-is" build/install of CMake. 它们保持原样,并且您无法通过“按原样”构建/安装CMake进行更改。

Of course, having said that, CMake is an open source project. 当然,CMake是一个开源项目。 You could dive in and submit a patch that changes CMake to support these features. 您可以深入研究并提交补丁,以更改CMake以支持这些功能。 :-) :-)

There are a few outstanding bugs ( cough , feature requests) for CMake that, if fixed/implemented, would add support for other platform types. CMake有一些突出的错误( 咳嗽 ,功能请求),如果已修复/实施,则将增加对其他平台类型的支持。 It will take quite a lot of effort to do it properly, though, and so far nobody has had the time/energy/funding to finish it off. 但是,要正确完成它需要大量的努力,并且到目前为止,没有人有时间/精力/资金来完成它。 See related CMake bug reports here: 在此处查看相关的CMake错误报告:

4) Output File 4)输出文件

This one you can change. 这个你可以改变。 Set the OUTPUT_NAME or OUTPUT_NAME_DEBUG target property. 设置OUTPUT_NAME或OUTPUT_NAME_DEBUG目标属性。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM