• Advertisement
Sign in to follow this  

[SOLVED] RC files and CMake : Executable Icon problem (Visual Studio)

This topic is 1118 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi all,

I have a .rc file :

IDI_ICON1 ICON DISCARDABLE "Icon.ico"

On the same folder I have the file "Icon.ico.

In "CMakeLists.txt" I have :

set(SOURCE_FILES ${SOURCE_FILES} ${CMAKE_CURRENT_SOURCE_DIR}/rc/Editor.rc)

When I create the visual studio project I have the rc file added correctly but when I build the icon is not on my .exe.

Why the icon is not on the .exe ? What is the solution of this problem ?

Thanks for the help

 

EDIT SOLVED:

The rc has to be added on the root and not in a filter :

add_executable(
  Name
  ${GUI_TYPE}
  ${SOURCE_FILES}
  ${CMAKE_CURRENT_SOURCE_DIR}/rc/Name.rc
)

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement