From f1c6c48b364065331e1589591d2a136e8ef3b7d6 Mon Sep 17 00:00:00 2001 From: Muzychenko Andrey <33288308+k4zmu2a@users.noreply.github.com> Date: Sun, 3 Oct 2021 18:57:19 +0300 Subject: [PATCH] Enabled icon in Windows build. --- CMakeLists.txt | 6 ++++++ SpaceCadetPinball/SpaceCadetPinball.rc | 1 + 2 files changed, 7 insertions(+) create mode 100644 SpaceCadetPinball/SpaceCadetPinball.rc diff --git a/CMakeLists.txt b/CMakeLists.txt index bea96ee..89da6bd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -167,6 +167,12 @@ set(SOURCE_FILES SpaceCadetPinball/imstb_truetype.h ) +# On Windows, include resource file with the icon +if(WIN32) + set_source_files_properties(SpaceCadetPinball/SpaceCadetPinball.rc LANGUAGE RC) + list(APPEND SOURCE_FILES SpaceCadetPinball/SpaceCadetPinball.rc) +endif(WIN32) + add_executable(SpaceCadetPinball ${SOURCE_FILES}) # Skip pch on foreign code diff --git a/SpaceCadetPinball/SpaceCadetPinball.rc b/SpaceCadetPinball/SpaceCadetPinball.rc new file mode 100644 index 0000000..c372b1e --- /dev/null +++ b/SpaceCadetPinball/SpaceCadetPinball.rc @@ -0,0 +1 @@ +ICON_1 ICON "icon_1.ico" \ No newline at end of file