mirror of
https://github.com/libretro/mgba.git
synced 2024-11-24 08:30:30 +00:00
Make platform directory for ports
This commit is contained in:
parent
a1fb90635f
commit
3edb2da58d
@ -14,8 +14,8 @@ include_directories(${CMAKE_SOURCE_DIR}/src/debugger)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/src/util)
|
||||
|
||||
find_package(SDL 1.2 REQUIRED)
|
||||
file(GLOB SDL_SRC ${CMAKE_SOURCE_DIR}/src/sdl/sdl-*.c)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/src/sdl)
|
||||
file(GLOB PLATFORM_SRC ${CMAKE_SOURCE_DIR}/src/platform/sdl/sdl-*.c)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/src/platform/sdl)
|
||||
|
||||
if(USE_DEBUGGER)
|
||||
file(GLOB DEBUGGER_SRC ${CMAKE_SOURCE_DIR}/src/debugger/*.c)
|
||||
@ -27,19 +27,18 @@ else()
|
||||
endif()
|
||||
|
||||
if(BUILD_RASPI AND BUILD_EGL)
|
||||
set(MAIN_SRC ${CMAKE_SOURCE_DIR}/src/egl-main.c)
|
||||
set(MAIN_SRC ${CMAKE_SOURCE_DIR}/src/platform/sdl/egl-main.c)
|
||||
set(OPENGL_LIBRARY "-lEGL -lGLESv2 -lbcm_host")
|
||||
set(OPENGL_INCLUDE_DIR "")
|
||||
add_definitions(-DBUILD_RASPI)
|
||||
elseif(BUILD_BBB OR BUILD_RASPI)
|
||||
add_definitions(-DCOLOR_16_BIT -DCOLOR_5_6_5)
|
||||
set(MAIN_SRC ${CMAKE_SOURCE_DIR}/src/sdl-main.c)
|
||||
set(MAIN_SRC ${CMAKE_SOURCE_DIR}/src/platform/sdl/sw-main.c)
|
||||
else()
|
||||
set(MAIN_SRC ${CMAKE_SOURCE_DIR}/src/gl-main.c)
|
||||
set(MAIN_SRC ${CMAKE_SOURCE_DIR}/src/platform/sdl/gl-main.c)
|
||||
find_package(OpenGL REQUIRED)
|
||||
include_directories(${SDL_INCLUDE_DIR} ${OPENGL_INCLUDE_DIR})
|
||||
endif()
|
||||
include_directories(${SDL_INCLUDE_DIR} ${OPENGL_INCLUDE_DIR})
|
||||
|
||||
add_executable(${BINARY_NAME} ${ARM_SRC} ${GBA_SRC} ${DEBUGGER_SRC} ${RENDERER_SRC} ${UTIL_SRC} ${SDL_SRC} ${MAIN_SRC})
|
||||
add_executable(${BINARY_NAME} ${ARM_SRC} ${GBA_SRC} ${DEBUGGER_SRC} ${RENDERER_SRC} ${UTIL_SRC} ${PLATFORM_SRC} ${MAIN_SRC})
|
||||
target_link_libraries(${BINARY_NAME} m pthread ${DEBUGGER_LIB} ${SDL_LIBRARY} ${OPENGL_LIBRARY})
|
||||
|
Loading…
Reference in New Issue
Block a user