[nostalgia/core] Cleanup CMakeLists.txt
This commit is contained in:
parent
64ac8f7dbf
commit
52efae287b
@ -1,43 +1,3 @@
|
||||
if(NOT NOSTALGIA_BUILD_TYPE STREQUAL "GBA")
|
||||
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
|
||||
glad
|
||||
glfw
|
||||
imgui
|
||||
OxEvent
|
||||
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-Common OBJECT
|
||||
gfx.cpp
|
||||
@ -46,11 +6,6 @@ add_library(
|
||||
typestore.cpp
|
||||
)
|
||||
|
||||
add_library(
|
||||
NostalgiaCore
|
||||
${NOSTALGIA_CORE_IMPL_SRC}
|
||||
)
|
||||
|
||||
add_library(
|
||||
NostalgiaCore-Headless
|
||||
headless/core.cpp
|
||||
@ -58,6 +13,46 @@ add_library(
|
||||
headless/media.cpp
|
||||
)
|
||||
|
||||
add_library(NostalgiaCore)
|
||||
|
||||
if(NOT NOSTALGIA_BUILD_TYPE STREQUAL "GBA")
|
||||
target_sources(
|
||||
NostalgiaCore PRIVATE
|
||||
glfw/clipboard.cpp
|
||||
glfw/core.cpp
|
||||
glfw/gfx.cpp
|
||||
userland/gfx.cpp
|
||||
userland/gfx_opengl.cpp
|
||||
userland/media.cpp
|
||||
)
|
||||
target_link_libraries(
|
||||
NostalgiaCore PUBLIC
|
||||
glad
|
||||
glfw
|
||||
imgui
|
||||
OxEvent
|
||||
NostalgiaGlUtils
|
||||
)
|
||||
else()
|
||||
enable_language(CXX ASM)
|
||||
set_source_files_properties(core.arm.cpp irq.arm.cpp PROPERTIES COMPILE_FLAGS -marm)
|
||||
target_sources(
|
||||
NostalgiaCore PRIVATE
|
||||
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
|
||||
)
|
||||
target_link_libraries(
|
||||
NostalgiaCore PUBLIC
|
||||
GbaStartup
|
||||
)
|
||||
endif()
|
||||
|
||||
if(NOT MSVC)
|
||||
target_compile_options(NostalgiaCore-Common PUBLIC -Wsign-conversion)
|
||||
endif()
|
||||
@ -71,7 +66,6 @@ target_link_libraries(
|
||||
target_link_libraries(
|
||||
NostalgiaCore PUBLIC
|
||||
NostalgiaCore-Common
|
||||
${NOSTALGIA_CORE_IMPL_LIBS}
|
||||
)
|
||||
|
||||
target_link_libraries(
|
||||
|
Loading…
Reference in New Issue
Block a user