[nostalgia] Collapse NostalgiaCore down to a single library and cleanup impl data access
This commit is contained in:
@@ -1,7 +1,56 @@
|
||||
if(NOT NOSTALGIA_BUILD_TYPE STREQUAL "GBA")
|
||||
find_package(glfw3 REQUIRED)
|
||||
find_package(imgui REQUIRED)
|
||||
if(APPLE)
|
||||
find_package(OpenGL REQUIRED)
|
||||
else()
|
||||
set(OPENGL_gl_LIBRARY GL)
|
||||
endif()
|
||||
set(
|
||||
NOSTALGIA_CORE_IMPL_SRC
|
||||
glfw/clipboard.cpp
|
||||
glfw/core.cpp
|
||||
glfw/gfx.cpp
|
||||
userland/gfx.cpp
|
||||
userland/gfx_opengl.cpp
|
||||
userland/media.cpp
|
||||
)
|
||||
set(
|
||||
NOSTALGIA_CORE_IMPL_LIBS
|
||||
${OPENGL_gl_LIBRARY}
|
||||
glfw::glfw
|
||||
imgui::imgui
|
||||
imgui-glfw
|
||||
NostalgiaGlUtils
|
||||
)
|
||||
else()
|
||||
enable_language(C ASM)
|
||||
set_source_files_properties(core.arm.cpp irq.arm.cpp PROPERTIES COMPILE_FLAGS -marm)
|
||||
set(
|
||||
NOSTALGIA_CORE_IMPL_SRC
|
||||
gba/bios.s
|
||||
gba/core.arm.cpp
|
||||
gba/core.cpp
|
||||
gba/gfx.cpp
|
||||
gba/irq.arm.cpp
|
||||
gba/irq.s
|
||||
gba/media.cpp
|
||||
gba/panic.cpp
|
||||
)
|
||||
set(
|
||||
NOSTALGIA_CORE_IMPL_LIBS
|
||||
GbaStartup
|
||||
OxFS
|
||||
OxStd
|
||||
)
|
||||
endif()
|
||||
|
||||
add_library(
|
||||
NostalgiaCore
|
||||
context.cpp
|
||||
gfx.cpp
|
||||
media.cpp
|
||||
${NOSTALGIA_CORE_IMPL_SRC}
|
||||
)
|
||||
|
||||
if(NOT MSVC)
|
||||
@@ -12,14 +61,9 @@ target_link_libraries(
|
||||
NostalgiaCore PUBLIC
|
||||
OxClaw
|
||||
OxFS
|
||||
${NOSTALGIA_CORE_IMPL_LIBS}
|
||||
)
|
||||
|
||||
add_subdirectory(gba)
|
||||
if(NOSTALGIA_BUILD_TYPE STREQUAL "Native")
|
||||
add_subdirectory(glfw)
|
||||
#add_subdirectory(sdl)
|
||||
add_subdirectory(userland)
|
||||
endif()
|
||||
if(NOSTALGIA_BUILD_STUDIO)
|
||||
add_subdirectory(studio)
|
||||
endif()
|
||||
@@ -32,6 +76,7 @@ install(
|
||||
consts.hpp
|
||||
context.hpp
|
||||
core.hpp
|
||||
event.hpp
|
||||
gfx.hpp
|
||||
input.hpp
|
||||
media.hpp
|
||||
|
||||
Reference in New Issue
Block a user