| 
									
										
										
										
											2021-05-11 16:08:08 -04:00
										 |  |  | cmake_minimum_required(VERSION 3.0)
 | 
					
						
							| 
									
										
										
										
											2021-05-13 04:22:57 -04:00
										 |  |  | project(furnace)
 | 
					
						
							| 
									
										
										
										
											2021-05-11 16:08:08 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-12-09 03:37:31 -05:00
										 |  |  | set(CMAKE_CXX_STANDARD 14)
 | 
					
						
							| 
									
										
										
										
											2021-05-11 16:08:08 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-12-11 02:10:09 -05:00
										 |  |  | if (ANDROID)
 | 
					
						
							|  |  |  |   set(BUILD_GUI OFF)
 | 
					
						
							|  |  |  | else()
 | 
					
						
							|  |  |  |   set(BUILD_GUI ON)
 | 
					
						
							|  |  |  | endif()
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-12-11 16:44:02 -05:00
										 |  |  | add_subdirectory(extern/fmt)
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-12-07 12:21:23 -05:00
										 |  |  | set(BUILD_TESTING OFF)
 | 
					
						
							| 
									
										
										
										
											2021-12-10 15:16:40 -05:00
										 |  |  | set(BUILD_PROGRAMS OFF)
 | 
					
						
							|  |  |  | set(BUILD_EXAMPLES OFF)
 | 
					
						
							| 
									
										
										
										
											2021-12-07 12:21:23 -05:00
										 |  |  | add_subdirectory(extern/libsndfile)
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-05-11 16:08:08 -04:00
										 |  |  | if (WIN32)
 | 
					
						
							| 
									
										
										
										
											2021-05-28 16:52:27 -04:00
										 |  |  |   set(SDL_SHARED OFF)
 | 
					
						
							| 
									
										
										
										
											2021-05-28 16:25:55 -04:00
										 |  |  |   add_subdirectory(extern/SDL)
 | 
					
						
							|  |  |  |   add_subdirectory(extern/zlib)
 | 
					
						
							| 
									
										
										
										
											2021-05-11 16:08:08 -04:00
										 |  |  |   set(HAVE_SDL2 SDL2-static)
 | 
					
						
							| 
									
										
										
										
											2021-05-28 16:25:55 -04:00
										 |  |  |   set(HAVE_Z zlibstatic)
 | 
					
						
							| 
									
										
										
										
											2021-12-15 00:37:27 -05:00
										 |  |  |   include_directories(extern/imgui extern/imgui/backends extern/igfd  extern/zlib ${CMAKE_CURRENT_BINARY_DIR}/extern/zlib extern/fmt/include)
 | 
					
						
							| 
									
										
										
										
											2021-05-11 16:08:08 -04:00
										 |  |  | else()
 | 
					
						
							| 
									
										
										
										
											2021-12-11 02:10:09 -05:00
										 |  |  |   if (BUILD_GUI)
 | 
					
						
							|  |  |  |     set(SDL_SHARED ON)
 | 
					
						
							|  |  |  |     add_subdirectory(extern/SDL)
 | 
					
						
							| 
									
										
										
										
											2021-12-15 00:37:27 -05:00
										 |  |  |     include_directories(extern/SDL/include extern/imgui extern/imgui/backends extern/igfd extern/fmt/include)
 | 
					
						
							| 
									
										
										
										
											2021-12-11 16:44:02 -05:00
										 |  |  |     if (APPLE)
 | 
					
						
							|  |  |  |       set(HAVE_SDL2 SDL2-static)
 | 
					
						
							|  |  |  |     else()
 | 
					
						
							|  |  |  |       set(HAVE_SDL2 SDL2)
 | 
					
						
							|  |  |  |     endif()
 | 
					
						
							| 
									
										
										
										
											2021-12-11 02:10:09 -05:00
										 |  |  |   else()
 | 
					
						
							|  |  |  |     find_library(HAVE_SDL2 SDL2)
 | 
					
						
							|  |  |  |   endif()
 | 
					
						
							| 
									
										
										
										
											2021-05-28 17:06:57 -04:00
										 |  |  |   if (NOT APPLE)
 | 
					
						
							|  |  |  |     find_library(HAVE_JACK jack)
 | 
					
						
							|  |  |  |   endif()
 | 
					
						
							| 
									
										
										
										
											2021-05-28 16:25:55 -04:00
										 |  |  |   find_library(HAVE_Z z)
 | 
					
						
							| 
									
										
										
										
											2021-12-07 12:21:23 -05:00
										 |  |  |   find_library(HAVE_SNDFILE sndfile)
 | 
					
						
							| 
									
										
										
										
											2021-05-11 16:08:08 -04:00
										 |  |  | endif()
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | set(AUDIO_SOURCES src/audio/abstract.cpp)
 | 
					
						
							|  |  |  | if (HAVE_SDL2)
 | 
					
						
							|  |  |  |   list(APPEND AUDIO_SOURCES src/audio/sdl.cpp)
 | 
					
						
							|  |  |  | endif()
 | 
					
						
							|  |  |  | if (HAVE_JACK)
 | 
					
						
							|  |  |  |   list(APPEND AUDIO_SOURCES src/audio/jack.cpp)
 | 
					
						
							|  |  |  | endif()
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-05-12 04:58:55 -04:00
										 |  |  | set(ENGINE_SOURCES | 
					
						
							|  |  |  | src/log.cpp
 | 
					
						
							| 
									
										
										
										
											2021-05-12 18:19:18 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | extern/Nuked-OPN2/ym3438.c
 | 
					
						
							| 
									
										
										
										
											2021-12-09 01:03:05 -05:00
										 |  |  | extern/opm/opm.c
 | 
					
						
							| 
									
										
										
										
											2021-05-14 04:23:40 -04:00
										 |  |  | src/engine/platform/sound/sn76496.cpp
 | 
					
						
							| 
									
										
										
										
											2021-05-22 22:10:25 -04:00
										 |  |  | src/engine/platform/sound/gb/apu.c
 | 
					
						
							| 
									
										
										
										
											2021-05-27 06:06:43 -04:00
										 |  |  | src/engine/platform/sound/gb/timing.c
 | 
					
						
							| 
									
										
										
										
											2021-06-06 15:02:38 -04:00
										 |  |  | src/engine/platform/sound/pce_psg.cpp
 | 
					
						
							| 
									
										
										
										
											2021-12-03 16:04:07 -05:00
										 |  |  | src/engine/platform/sound/nes/apu.c
 | 
					
						
							| 
									
										
										
										
											2021-05-12 18:19:18 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-12-04 02:42:22 -05:00
										 |  |  | src/engine/platform/sound/c64/sid.cc
 | 
					
						
							|  |  |  | src/engine/platform/sound/c64/voice.cc
 | 
					
						
							|  |  |  | src/engine/platform/sound/c64/wave.cc
 | 
					
						
							|  |  |  | src/engine/platform/sound/c64/envelope.cc
 | 
					
						
							|  |  |  | src/engine/platform/sound/c64/filter.cc
 | 
					
						
							|  |  |  | src/engine/platform/sound/c64/extfilt.cc
 | 
					
						
							|  |  |  | src/engine/platform/sound/c64/pot.cc
 | 
					
						
							|  |  |  | src/engine/platform/sound/c64/version.cc
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | src/engine/platform/sound/c64/wave6581_PS_.cc
 | 
					
						
							|  |  |  | src/engine/platform/sound/c64/wave6581_PST.cc
 | 
					
						
							|  |  |  | src/engine/platform/sound/c64/wave6581_P_T.cc
 | 
					
						
							|  |  |  | src/engine/platform/sound/c64/wave6581__ST.cc
 | 
					
						
							|  |  |  | src/engine/platform/sound/c64/wave8580_PS_.cc
 | 
					
						
							|  |  |  | src/engine/platform/sound/c64/wave8580_PST.cc
 | 
					
						
							|  |  |  | src/engine/platform/sound/c64/wave8580_P_T.cc
 | 
					
						
							|  |  |  | src/engine/platform/sound/c64/wave8580__ST.cc
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-12-15 01:23:58 -05:00
										 |  |  | src/engine/platform/sound/ymfm/ymfm_adpcm.cpp
 | 
					
						
							|  |  |  | src/engine/platform/sound/ymfm/ymfm_opm.cpp
 | 
					
						
							|  |  |  | src/engine/platform/sound/ymfm/ymfm_opn.cpp
 | 
					
						
							|  |  |  | src/engine/platform/sound/ymfm/ymfm_ssg.cpp
 | 
					
						
							| 
									
										
										
										
											2021-12-09 03:37:31 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-12-09 13:25:02 -05:00
										 |  |  | src/engine/platform/ym2610Interface.cpp
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-05-12 04:58:55 -04:00
										 |  |  | src/engine/blip_buf.c
 | 
					
						
							|  |  |  | src/engine/safeReader.cpp
 | 
					
						
							| 
									
										
										
										
											2021-12-15 14:15:44 -05:00
										 |  |  | src/engine/safeWriter.cpp
 | 
					
						
							| 
									
										
										
										
											2021-05-12 04:58:55 -04:00
										 |  |  | src/engine/engine.cpp
 | 
					
						
							| 
									
										
										
										
											2021-05-15 17:42:48 -04:00
										 |  |  | src/engine/macroInt.cpp
 | 
					
						
							| 
									
										
										
										
											2021-12-09 01:44:40 -05:00
										 |  |  | src/engine/pattern.cpp
 | 
					
						
							| 
									
										
										
										
											2021-05-12 04:58:55 -04:00
										 |  |  | src/engine/playback.cpp
 | 
					
						
							| 
									
										
										
										
											2021-12-15 14:15:44 -05:00
										 |  |  | src/engine/sample.cpp
 | 
					
						
							|  |  |  | src/engine/song.cpp
 | 
					
						
							| 
									
										
										
										
											2021-05-12 04:58:55 -04:00
										 |  |  | src/engine/platform/abstract.cpp
 | 
					
						
							| 
									
										
										
										
											2021-05-12 18:19:18 -04:00
										 |  |  | src/engine/platform/genesis.cpp
 | 
					
						
							| 
									
										
										
										
											2021-05-16 18:43:10 -04:00
										 |  |  | src/engine/platform/genesisext.cpp
 | 
					
						
							| 
									
										
										
										
											2021-05-15 15:18:16 -04:00
										 |  |  | src/engine/platform/sms.cpp
 | 
					
						
							| 
									
										
										
										
											2021-05-26 04:17:12 -04:00
										 |  |  | src/engine/platform/gb.cpp
 | 
					
						
							| 
									
										
										
										
											2021-06-06 15:02:38 -04:00
										 |  |  | src/engine/platform/pce.cpp
 | 
					
						
							| 
									
										
										
										
											2021-12-04 01:19:54 -05:00
										 |  |  | src/engine/platform/nes.cpp
 | 
					
						
							| 
									
										
										
										
											2021-12-04 23:55:28 -05:00
										 |  |  | src/engine/platform/c64.cpp
 | 
					
						
							| 
									
										
										
										
											2021-12-08 17:40:35 -05:00
										 |  |  | src/engine/platform/arcade.cpp
 | 
					
						
							| 
									
										
										
										
											2021-12-09 13:25:02 -05:00
										 |  |  | src/engine/platform/ym2610.cpp
 | 
					
						
							| 
									
										
										
										
											2021-12-14 14:31:57 -05:00
										 |  |  | src/engine/platform/ym2610ext.cpp
 | 
					
						
							| 
									
										
										
										
											2021-05-12 04:58:55 -04:00
										 |  |  | src/engine/platform/dummy.cpp)
 | 
					
						
							| 
									
										
										
										
											2021-05-11 16:08:08 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-12-11 02:10:09 -05:00
										 |  |  | set(GUI_SOURCES | 
					
						
							|  |  |  | extern/imgui/imgui.cpp
 | 
					
						
							|  |  |  | extern/imgui/imgui_draw.cpp
 | 
					
						
							|  |  |  | extern/imgui/imgui_tables.cpp
 | 
					
						
							|  |  |  | extern/imgui/imgui_widgets.cpp
 | 
					
						
							|  |  |  | extern/imgui/backends/imgui_impl_sdlrenderer.cpp
 | 
					
						
							|  |  |  | extern/imgui/backends/imgui_impl_sdl.cpp
 | 
					
						
							| 
									
										
										
										
											2021-12-11 17:41:32 -05:00
										 |  |  | extern/imgui/misc/cpp/imgui_stdlib.cpp
 | 
					
						
							| 
									
										
										
										
											2021-12-11 02:10:09 -05:00
										 |  |  | extern/igfd/ImGuiFileDialog.cpp
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-12-11 03:11:40 -05:00
										 |  |  | src/gui/font_main.cpp
 | 
					
						
							|  |  |  | src/gui/font_pat.cpp
 | 
					
						
							| 
									
										
										
										
											2021-12-11 02:10:09 -05:00
										 |  |  | src/gui/gui.cpp)
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-12-16 15:51:19 -05:00
										 |  |  | if (WIN32)
 | 
					
						
							|  |  |  |   list(APPEND ENGINE_SOURCES src/utfutils.cpp)
 | 
					
						
							|  |  |  | endif()
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-12-11 02:10:09 -05:00
										 |  |  | if (BUILD_GUI)
 | 
					
						
							|  |  |  |   add_executable(furnace ${ENGINE_SOURCES} ${AUDIO_SOURCES} ${GUI_SOURCES} src/main.cpp)
 | 
					
						
							| 
									
										
										
										
											2021-12-11 03:11:40 -05:00
										 |  |  |   target_compile_definitions(furnace PUBLIC HAVE_GUI)
 | 
					
						
							| 
									
										
										
										
											2021-12-11 02:10:09 -05:00
										 |  |  | else()
 | 
					
						
							|  |  |  |   add_executable(furnace ${ENGINE_SOURCES} ${AUDIO_SOURCES} src/main.cpp)
 | 
					
						
							|  |  |  | endif()
 | 
					
						
							| 
									
										
										
										
											2021-05-11 16:08:08 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-12-11 16:44:02 -05:00
										 |  |  | target_link_libraries(furnace ${HAVE_SDL2} ${HAVE_Z} sndfile fmt)
 | 
					
						
							| 
									
										
										
										
											2021-05-11 16:08:08 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | if (HAVE_JACK)
 | 
					
						
							| 
									
										
										
										
											2021-05-13 04:22:57 -04:00
										 |  |  |   target_link_libraries(furnace ${HAVE_JACK})
 | 
					
						
							| 
									
										
										
										
											2021-06-09 04:33:03 -04:00
										 |  |  |   target_compile_definitions(furnace PUBLIC HAVE_JACK)
 | 
					
						
							| 
									
										
										
										
											2021-05-11 16:08:08 -04:00
										 |  |  | endif()
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | if (WIN32)
 | 
					
						
							| 
									
										
										
										
											2021-12-07 16:09:00 -05:00
										 |  |  |   target_link_libraries(furnace -static)
 | 
					
						
							| 
									
										
										
										
											2021-05-11 16:08:08 -04:00
										 |  |  | endif()
 |