mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-25 15:19:53 -06:00
make OpenGL renderer a build option
mostly meant for the Switch port
This commit is contained in:
@ -26,17 +26,12 @@ add_library(core STATIC
|
||||
FIFO.h
|
||||
GBACart.cpp
|
||||
GPU.cpp
|
||||
GPU_OpenGL.cpp
|
||||
GPU_OpenGL_shaders.h
|
||||
GPU2D.cpp
|
||||
GPU3D.cpp
|
||||
GPU3D_OpenGL.cpp
|
||||
GPU3D_OpenGL_shaders.h
|
||||
GPU3D_Soft.cpp
|
||||
melonDLDI.h
|
||||
NDS.cpp
|
||||
NDSCart.cpp
|
||||
OpenGLSupport.cpp
|
||||
Platform.h
|
||||
ROMList.h
|
||||
RTC.cpp
|
||||
@ -52,6 +47,16 @@ add_library(core STATIC
|
||||
xxhash/xxhash.c
|
||||
)
|
||||
|
||||
if (ENABLE_OGLRENDERER)
|
||||
target_sources(core PRIVATE
|
||||
GPU_OpenGL.cpp
|
||||
GPU_OpenGL_shaders.h
|
||||
GPU3D_OpenGL.cpp
|
||||
GPU3D_OpenGL_shaders.h
|
||||
OpenGLSupport.cpp
|
||||
)
|
||||
endif()
|
||||
|
||||
if (ENABLE_JIT)
|
||||
enable_language(ASM)
|
||||
|
||||
@ -95,8 +100,16 @@ if (ENABLE_JIT)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (WIN32)
|
||||
target_link_libraries(core ole32 comctl32 ws2_32 opengl32)
|
||||
if (ENABLE_OGLRENDERER)
|
||||
if (WIN32)
|
||||
target_link_libraries(core ole32 comctl32 ws2_32 opengl32)
|
||||
else()
|
||||
target_link_libraries(core GL EGL)
|
||||
endif()
|
||||
else()
|
||||
target_link_libraries(core GL EGL)
|
||||
endif()
|
||||
if (WIN32)
|
||||
target_link_libraries(core ole32 comctl32 ws2_32)
|
||||
else()
|
||||
target_link_libraries(core)
|
||||
endif()
|
||||
endif()
|
Reference in New Issue
Block a user