English 中文(简体)
CMake和视频室资源档案
原标题:CMake and Visual Studio resource files

我正在将利用2005年视觉演播室创建的C++项目转换为CMake,并用列入该项目的资源档案 problem倒了问题。

该项目包括一个<代码>.rc文档、一个>的星座(>.ico文档和一个.rc2文档。

The regular .rc file works fine in the generated project and uses the resource compiler. The .ico and .rc2 files however are causing problems when they are just being included, because in the generated project Visual Studio attempts to compile them using the C/C++ compiler.

我假设这些档案载于.rc文档中,因此也许会努力不将这些档案列入CMakeList。 txt文档,但由于显然有可能将这些档案列入项目(原始项目可见)。 我愿这样做,以便所生成项目的用户能够看到这些档案正在使用。

What is the correct way to handle these extra VS resource files in CMake?

问题回答

Try to set_source_files_properties(your.ico your.rc2 PROPERTIES LANGUAGE RC).

否则,它就与这些档案毫不相干。 来源档案财产局域网应当空出,因此,对档案采取的行动应当按档案类型加以核对。 什么是应该做的,因为它不是应该编纂的。

检查贵方的CMakeList.txt, 即没有一套——来源——档案——有价证券的指挥,与这种财产混在一起。

如果你想与档案做一些事情,就有两个途径:

在你建设项目时,加上“cus子”,你可以加起来,为他们管理习惯。 认为档案已经改变。

如果需要,你可以很容易地将其复制到建筑目录上。 《公约》缔约方会议旗帜。





相关问题
Undefined reference

I m getting this linker error. I know a way around it, but it s bugging me because another part of the project s linking fine and it s designed almost identically. First, I have namespace LCD. Then I ...

C++ Equivalent of Tidy

Is there an equivalent to tidy for HTML code for C++? I have searched on the internet, but I find nothing but C++ wrappers for tidy, etc... I think the keyword tidy is what has me hung up. I am ...

Template Classes in C++ ... a required skill set?

I m new to C++ and am wondering how much time I should invest in learning how to implement template classes. Are they widely used in industry, or is this something I should move through quickly?

Print possible strings created from a Number

Given a 10 digit Telephone Number, we have to print all possible strings created from that. The mapping of the numbers is the one as exactly on a phone s keypad. i.e. for 1,0-> No Letter for 2->...

typedef ing STL wstring

Why is it when i do the following i get errors when relating to with wchar_t? namespace Foo { typedef std::wstring String; } Now i declare all my strings as Foo::String through out the program, ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

Window iconification status via Xlib

Is it possible to check with the means of pure X11/Xlib only whether the given window is iconified/minimized, and, if it is, how?

热门标签