all repos — mgba @ 5122a236e0cb6ed73a274584b94d0639bf0157f3

mGBA Game Boy Advance Emulator

CMakeLists.txt (view raw)

 1cmake_minimum_required(VERSION 2.6)
 2project(GBAc)
 3set(CMAKE_C_FLAGS_DEBUG "-g -Wall -Wextra -Wno-unused -Werror")
 4set(CMAKE_C_FLAGS_RELEASE "-O3 -Wall -Wextra -Wno-unused -Werror")
 5file(GLOB ARM_SRC ${CMAKE_SOURCE_DIR}/src/arm/*.c)
 6file(GLOB GBA_SRC ${CMAKE_SOURCE_DIR}/src/gba/*.c)
 7file(GLOB RENDERER_SRC ${CMAKE_SOURCE_DIR}/src/gba/renderers/*.c)
 8file(GLOB DEBUGGER_SRC ${CMAKE_SOURCE_DIR}/src/debugger/*.c)
 9file(GLOB THIRD_PARTY ${CMAKE_SOURCE_DIR}/third-party/linenoise/linenoise.c)
10include_directories(${CMAKE_SOURCE_DIR}/src/arm)
11include_directories(${CMAKE_SOURCE_DIR}/src/gba)
12include_directories(${CMAKE_SOURCE_DIR}/src/debugger)
13include_directories(${CMAKE_SOURCE_DIR}/third-party/linenoise)
14
15find_package(SDL 1.2 REQUIRED)
16find_package(OpenGL REQUIRED)
17include_directories(${SDL_INCLUDE_DIR} ${OPENGL_INCLUDE_DIR})
18
19add_executable(gbac ${ARM_SRC} ${GBA_SRC} ${DEBUGGER_SRC} ${RENDERER_SRC} ${THIRD_PARTY} ${CMAKE_SOURCE_DIR}/src/main.c)
20target_link_libraries(gbac m pthread ${SDL_LIBRARY} ${OPENGL_LIBRARY})