all repos — mgba @ b4b7be1f8417d13fc59f5967137b8aa5a6991490

mGBA Game Boy Advance Emulator

Don't require SDL for perf builds
Jeffrey Pfau jeffrey@endrift.com
Thu, 23 Jan 2014 20:57:04 -0800
commit

b4b7be1f8417d13fc59f5967137b8aa5a6991490

parent

968dbe55db3f8cbb5aa1c0cc50a7b5a96fc5b30f

1 files changed, 9 insertions(+), 4 deletions(-)

jump to
M CMakeLists.txtCMakeLists.txt

@@ -14,16 +14,21 @@ include_directories(${CMAKE_SOURCE_DIR}/src/gba)

include_directories(${CMAKE_SOURCE_DIR}/src/debugger) include_directories(${CMAKE_SOURCE_DIR}/src/util) -find_package(SDL 1.2 REQUIRED) -file(GLOB PLATFORM_SRC ${CMAKE_SOURCE_DIR}/src/platform/sdl/sdl-*.c) if(WIN32) add_definitions(-D_WIN32_WINNT=0x0600) file(GLOB OS_SRC ${CMAKE_SOURCE_DIR}/src/platform/windows/*.c) else() add_definitions(-DUSE_PTHREADS) + set(PLATFORM_LIBRARY "${PLATFORM_LIBRARY};pthread") file(GLOB OS_SRC ${CMAKE_SOURCE_DIR}/src/platform/posix/*.c) endif() -include_directories(${CMAKE_SOURCE_DIR}/src/platform/sdl) + +if(NOT BUILD_PERF) + find_package(SDL 1.2 REQUIRED) + file(GLOB PLATFORM_SRC ${CMAKE_SOURCE_DIR}/src/platform/sdl/sdl-*.c) + set(PLATFORM_LIBRARY "${SDL_LIBRARY};${SDLMAIN_LIBRARY}") + include_directories(${CMAKE_SOURCE_DIR}/src/platform/sdl) +endif() if(USE_DEBUGGER) file(GLOB DEBUGGER_SRC ${CMAKE_SOURCE_DIR}/src/debugger/*.c)

@@ -57,4 +62,4 @@ endif()

endif() add_executable(${BINARY_NAME} WIN32 ${ARM_SRC} ${GBA_SRC} ${DEBUGGER_SRC} ${RENDERER_SRC} ${UTIL_SRC} ${PLATFORM_SRC} ${OS_SRC} ${MAIN_SRC}) -target_link_libraries(${BINARY_NAME} m ${DEBUGGER_LIB} ${SDL_LIBRARY} ${SDLMAIN_LIBRARY} ${OPENGL_LIBRARY} ${EXTRA_LIB}) +target_link_libraries(${BINARY_NAME} m ${DEBUGGER_LIB} ${PLATFORM_LIBRARY} ${OPENGL_LIBRARY} ${EXTRA_LIB})