开发者

CMake: Making a Visual Studio project for Windows Mobile

so far, my night has been extremely frustrating, trying to learn CMake. However, I'm slowly getting there. There are a couple of things bugging me though:

1) Additional Library Directories

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

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.

3) Setting the intermediate directory

I want to have this:

IntermediateDirectory="intermediate"

instead of this:

IntermediateDirectory="Galaxians.dir\Release"

but nothing seems to work.

4) Output file

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

2) Setting the platform name

3) Setting the intermediate directory

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.

Of course, having said that, CMake is an open source project. You could dive in and submit a patch that changes CMake to support these features. :-)

There are a few outstanding bugs (cough, feature requests) for CMake that, if fixed/implemented, would add support for other platform types. 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:

  • http://public.kitware.com/Bug/view.php?id=7919
  • http://public.kitware.com/Bug/view.php?id=8102
  • http://public.kitware.com/Bug/view.php?id=8486

4) Output File

This one you can change. Set the OUTPUT_NAME or OUTPUT_NAME_DEBUG target property.

  • http://cmake.org/cmake/help/cmake-2-8-docs.html#prop_tgt:OUTPUT_NAME
  • http://cmake.org/cmake/help/cmake-2-8-docs.html#prop_tgt:OUTPUT_NAME_CONFIG
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜