Allow the backend to be configurable
This commit is contained in:
parent
6efb90f28c
commit
bfd8088af5
|
@ -1,6 +1,21 @@
|
||||||
cmake_minimum_required(VERSION 3.0)
|
cmake_minimum_required(VERSION 3.0)
|
||||||
project(GLdc)
|
project(GLdc)
|
||||||
|
|
||||||
|
# set the default backend
|
||||||
|
if(PLATFORM_DREAMCAST)
|
||||||
|
set(BACKEND "kospvr" CACHE STRING "Backend to use")
|
||||||
|
else()
|
||||||
|
set(BACKEND "software" CACHE STRING "Backend to use")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# List of possible backends
|
||||||
|
set_property(CACHE BACKEND PROPERTY STRINGS kospvr software)
|
||||||
|
|
||||||
|
message("\nCompiling using backend: ${BACKEND}\n")
|
||||||
|
|
||||||
|
string(TOUPPER ${BACKEND} BACKEND_UPPER)
|
||||||
|
add_definitions(-DBACKEND_${BACKEND_UPPER})
|
||||||
|
|
||||||
set(CMAKE_C_STANDARD 99)
|
set(CMAKE_C_STANDARD 99)
|
||||||
|
|
||||||
include_directories(include)
|
include_directories(include)
|
||||||
|
|
|
@ -491,7 +491,7 @@ static inline void CompilePolyHeader(PolyHeader *dst, const PolyContext *src) {
|
||||||
dst->d3 = dst->d4 = 0xffffffff;
|
dst->d3 = dst->d4 = 0xffffffff;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __DREAMCAST__
|
#ifdef BACKEND_KOSPVR
|
||||||
#include "platforms/sh4.h"
|
#include "platforms/sh4.h"
|
||||||
#else
|
#else
|
||||||
#include "platforms/software.h"
|
#include "platforms/software.h"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user