CMake and Visual Studio resource files

怎甘沉沦 提交于 2019-12-03 13:06:51

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

By default it shouldn't do anything with those files. The source file property LANGUAGE should be empty and thus the action for the file should be checked by the file type. Which shouldn't be anything since it's not something it should compile.

Check your CMakeLists.txt that is doesn't contain a set_source_files_properties command that would mess with that property.

If you want to do something with the files, here are two ways to do things:

With add_custom_target you can add them and run custom commands for them when you build the project. Granted that the files have changed.

With configure_file you can easily copy them to a build directory if needed. With the COPYONLY flag.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!