Sign in to follow this  
Alundra

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

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this