shithub: puzzles

Download patch

ref: f63810fbc89158d5637e4f554436c80140569024
parent: 0363e9e7fd49a240a39794904d38d4738f7c9d2a
author: Ben Harris <bjh21@bjh21.me.uk>
date: Sat Dec 31 04:28:54 EST 2022

Don't use Null Game's extra source files for all GUI programs

All the not-quite-puzzle GUI programs (only galaxieseditor at this
point) were using the extra source files from Null Game, presumably as a
convenient way of asking not to have an icon on platforms where icons
are provided as extra source files.  Unfortunately, this all went wrong
if Null Game did have a save file for an icon, causing CMake to complain
about multiple definitions of a target.

Now these programs look for extra files under their own names, which
will work just as well since those have no save files to generate icons
from either.

--- a/cmake/setup.cmake
+++ b/cmake/setup.cmake
@@ -124,7 +124,7 @@
     "" "COMPILE_DEFINITIONS" "" ${ARGN})
 
   if(build_gui_programs)
-    get_platform_puzzle_extra_source_files(extra_files nullgame)
+    get_platform_puzzle_extra_source_files(extra_files ${NAME})
     add_executable(${NAME} ${OPT_UNPARSED_ARGUMENTS} ${extra_files})
     target_link_libraries(${NAME}
       common ${platform_gui_libs} ${platform_libs})