furnace/CMakeLists.txt

75 lines
1.7 KiB
Text
Raw Normal View History

cmake_minimum_required(VERSION 3.0)
2021-05-13 08:22:57 +00:00
project(furnace)
set(CMAKE_CXX_STANDARD 11)
if (WIN32)
2021-05-28 20:52:27 +00:00
set(SDL_SHARED OFF)
2021-05-28 20:25:55 +00:00
add_subdirectory(extern/SDL)
add_subdirectory(extern/zlib)
set(HAVE_SDL2 SDL2-static)
2021-05-28 20:25:55 +00:00
set(HAVE_Z zlibstatic)
include_directories(extern/zlib ${CMAKE_CURRENT_BINARY_DIR}/extern/zlib)
else()
find_library(HAVE_SDL2 SDL2)
2021-05-28 21:06:57 +00:00
if (NOT APPLE)
find_library(HAVE_JACK jack)
endif()
2021-05-28 20:25:55 +00:00
find_library(HAVE_Z z)
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()
set(ENGINE_SOURCES
src/log.cpp
2021-05-12 22:19:18 +00:00
extern/Nuked-OPN2/ym3438.c
2021-05-14 08:23:40 +00:00
src/engine/platform/sound/sn76496.cpp
src/engine/platform/sound/gb/apu.c
src/engine/platform/sound/gb/timing.c
src/engine/platform/sound/pce_psg.cpp
2021-12-03 21:04:07 +00:00
src/engine/platform/sound/nes/apu.c
2021-05-12 22:19:18 +00:00
src/engine/blip_buf.c
src/engine/safeReader.cpp
src/engine/engine.cpp
src/engine/macroInt.cpp
src/engine/playback.cpp
src/engine/platform/abstract.cpp
2021-05-12 22:19:18 +00:00
src/engine/platform/genesis.cpp
2021-05-16 22:43:10 +00:00
src/engine/platform/genesisext.cpp
src/engine/platform/sms.cpp
2021-05-26 08:17:12 +00:00
src/engine/platform/gb.cpp
src/engine/platform/pce.cpp
2021-12-04 06:19:54 +00:00
src/engine/platform/nes.cpp
src/engine/platform/dummy.cpp)
#imgui/imgui.cpp
#imgui/imgui_demo.cpp
#imgui/imgui_draw.cpp
#imgui/imgui_tables.cpp
#imgui/imgui_widgets.cpp
#imgui/backends/imgui_impl_opengl3.cpp
#imgui/backends/imgui_impl_sdl.cpp
#src/gui/main.cpp)
2021-05-13 08:22:57 +00:00
add_executable(furnace ${ENGINE_SOURCES} ${AUDIO_SOURCES}
src/main.cpp)
2021-05-28 20:25:55 +00:00
target_link_libraries(furnace ${HAVE_SDL2} ${HAVE_Z})
if (HAVE_JACK)
2021-05-13 08:22:57 +00:00
target_link_libraries(furnace ${HAVE_JACK})
2021-06-09 08:33:03 +00:00
target_compile_definitions(furnace PUBLIC HAVE_JACK)
endif()
if (WIN32)
2021-05-13 08:22:57 +00:00
target_link_libraries(furnace SDL2main)
endif()