project(sgherm)

cmake_minimum_required(VERSION 2.8.8)

set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")

include(platform)
include(cflags)
include(frontend)

include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include")

set_cflags()
platform_checks()

# Doodads for the core
set(CORE_FILES src/sgherm.c src/ctl_unit.c src/input.c src/lcdc.c src/memory.c
	src/mbc.c src/print.c src/rom_read.c src/serio.c src/sound.c
	src/timer.c src/debug.c src/signals.c src/util.c src/frontend.c)
add_library("sgherm-core" OBJECT ${CORE_FILES})

# Do the frontend checks
frontend_checks()

configure_file("${CMAKE_CURRENT_SOURCE_DIR}/config.h.in" "${CMAKE_CURRENT_SOURCE_DIR}/include/config.h")

project(sgherm)

cmake_minimum_required(VERSION 2.8.8)

set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")

include(platform)
include(cflags)
include(frontend)

include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include")

option(THROTTLE_VBLANK "Enable throttling of vblank" OFF)

set_cflags()
platform_checks()

# Doodads for the core
set(CORE_FILES src/sgherm.c src/ctl_unit.c src/input.c src/lcdc.c src/memory.c
	src/mbc.c src/print.c src/rom_read.c src/serio.c src/sound.c
	src/timer.c src/debug.c src/signals.c src/util.c src/frontend.c)
add_library("sgherm-core" OBJECT ${CORE_FILES})

# Do the frontend checks
frontend_checks()

configure_file("${CMAKE_CURRENT_SOURCE_DIR}/config.h.in" "${CMAKE_CURRENT_SOURCE_DIR}/include/config.h")

if(THROTTLE_VBLANK)
	add_definitions("-DTHROTTLE_VBLANK")
endif()

Add throttle option to CMake
Add throttle option to CMake
