Merge branch 'master' into qt Conflicts: CMakeLists.txt
Jeffrey Pfau jeffrey@endrift.com
Fri, 31 Jan 2014 01:03:02 -0800
1 files changed,
8 insertions(+),
2 deletions(-)
jump to
M
CMakeLists.txt
→
CMakeLists.txt
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 2.6) project(GBAc) set(BINARY_NAME gbac CACHE INTERNAL "Name of output binaries") -set(CMAKE_C_FLAGS_DEBUG "-g -Wall -Wextra -Wno-error=type-limits --std=gnu99") +set(CMAKE_C_FLAGS_DEBUG "-g -Wall -Wextra --std=gnu99") set(CMAKE_C_FLAGS_RELEASE "-O3 -Wall -Wextra --std=gnu99") set(USE_DEBUGGER ON CACHE BOOL "Whether or not to enable the ARM debugger") set(BUILD_QT ON CACHE BOOL "Build Qt frontend")@@ -11,6 +11,9 @@ file(GLOB ARM_SRC ${CMAKE_SOURCE_DIR}/src/arm/*.c)
file(GLOB GBA_SRC ${CMAKE_SOURCE_DIR}/src/gba/*.c) file(GLOB UTIL_SRC ${CMAKE_SOURCE_DIR}/src/util/*.[cS]) file(GLOB RENDERER_SRC ${CMAKE_SOURCE_DIR}/src/gba/renderers/video-software.c) +source_group("ARM core" FILES ${ARM_SRC}) +source_group("GBA board" FILES ${GBA_SRC} ${RENDERER_SRC}) +source_group("Utilities" FILES ${UTIL_SRC}) include_directories(${CMAKE_SOURCE_DIR}/src/arm) include_directories(${CMAKE_SOURCE_DIR}/src/gba) include_directories(${CMAKE_SOURCE_DIR}/src/debugger)@@ -19,14 +22,17 @@
if(WIN32) add_definitions(-D_WIN32_WINNT=0x0600) file(GLOB OS_SRC ${CMAKE_SOURCE_DIR}/src/platform/windows/*.c) + source_group("Windows-specific code" FILES ${OS_SRC}) else() add_definitions(-DUSE_PTHREADS) set(OS_LIBRARY "${OS_LIBRARY};pthread") file(GLOB OS_SRC ${CMAKE_SOURCE_DIR}/src/platform/posix/*.c) + source_group("POSIX-specific code" FILES ${OS_SRC}) endif() if(USE_DEBUGGER) file(GLOB DEBUGGER_SRC ${CMAKE_SOURCE_DIR}/src/debugger/*.c) + source_group("ARM debugger" FILES ${DEBUGGER_SRC}) set(DEBUGGER_LIB "edit") add_definitions(-DUSE_DEBUGGER) else()@@ -38,7 +44,7 @@ add_library(${BINARY_NAME} SHARED ${ARM_SRC} ${GBA_SRC} ${DEBUGGER_SRC} ${RENDERER_SRC} ${UTIL_SRC} ${OS_SRC})
target_link_libraries(${BINARY_NAME} m ${DEBUGGER_LIB} ${OS_LIB}) if(BUILD_SDL) - add_subdirectory(src/platform/sdl) + add_subdirectory(${CMAKE_SOURCE_DIR}/src/platform/sdl ${CMAKE_BINARY_DIR}/sdl) endif() if(BUILD_PERF)