all repos — mgba @ 3edb2da58dbb4a4f08be5657b40384d87a2f7018

mGBA Game Boy Advance Emulator

Make platform directory for ports
Jeffrey Pfau jeffrey@endrift.com
Wed, 16 Oct 2013 01:35:49 -0700
commit

3edb2da58dbb4a4f08be5657b40384d87a2f7018

parent

a1fb90635fa80182447a8c2a1d6a21345a20c45d

M CMakeLists.txtCMakeLists.txt

@@ -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 @@ set(DEBUGGER_LIB "")

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})