diff --git a/runtime/cmake/PublicProducts.cmake b/runtime/cmake/PublicProducts.cmake index 361abb2..9a277f0 100644 --- a/runtime/cmake/PublicProducts.cmake +++ b/runtime/cmake/PublicProducts.cmake @@ -293,8 +293,21 @@ function(mkw_configure_product target) endif() endfunction() +if(MKW_PLATFORM_WINDOWS) + enable_language(RC) +endif() + +# Own object library so the products' C++ options never reach the resource compiler. +function(mkw_add_product_icon target) + if(MKW_PLATFORM_WINDOWS) + add_library(${target}_icon OBJECT "${MKW_RUNTIME_SOURCE_DIR}/resources/${target}.rc") + target_sources(${target} PRIVATE $) + endif() +endfunction() + add_executable(WiiCompiled "${MKW_BASE_PRODUCT_SOURCE}") mkw_configure_product(WiiCompiled) +mkw_add_product_icon(WiiCompiled) target_sources(WiiCompiled PRIVATE $) target_precompile_headers(WiiCompiled PRIVATE "${MKW_RUNTIME_SOURCE_DIR}/include/mkw_pch.h") @@ -305,6 +318,7 @@ endif() if(MKW_HAVE_RETRO_REWIND) add_executable(RetroRewind "${MKW_RETRO_REWIND_PRODUCT_SOURCE}") mkw_configure_product(RetroRewind) + mkw_add_product_icon(RetroRewind) target_precompile_headers(RetroRewind REUSE_FROM WiiCompiled) target_sources(RetroRewind PRIVATE $) if(TARGET mkw_retro_sensitive) diff --git a/runtime/resources/RetroRewind.ico b/runtime/resources/RetroRewind.ico new file mode 100644 index 0000000..e118f35 Binary files /dev/null and b/runtime/resources/RetroRewind.ico differ diff --git a/runtime/resources/RetroRewind.rc b/runtime/resources/RetroRewind.rc new file mode 100644 index 0000000..9e1cd04 --- /dev/null +++ b/runtime/resources/RetroRewind.rc @@ -0,0 +1 @@ +1 ICON "RetroRewind.ico" diff --git a/runtime/resources/WiiCompiled.ico b/runtime/resources/WiiCompiled.ico new file mode 100644 index 0000000..cede9d2 Binary files /dev/null and b/runtime/resources/WiiCompiled.ico differ diff --git a/runtime/resources/WiiCompiled.rc b/runtime/resources/WiiCompiled.rc new file mode 100644 index 0000000..2b06eb8 --- /dev/null +++ b/runtime/resources/WiiCompiled.rc @@ -0,0 +1 @@ +1 ICON "WiiCompiled.ico"