CMakeLists: Fix SDL-less build when there is no SDL on the system.
This commit is contained in:
parent
244779ed19
commit
cd6065d78b
@ -747,8 +747,11 @@ if(BUILD_OPENEMU)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(BUILD_SDL)
|
if(BUILD_SDL)
|
||||||
add_definitions(-DBUILD_SDL)
|
|
||||||
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/src/platform/sdl ${CMAKE_CURRENT_BINARY_DIR}/sdl)
|
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/src/platform/sdl ${CMAKE_CURRENT_BINARY_DIR}/sdl)
|
||||||
|
# The SDL platform CMakeLists could decide to disable SDL, so check again before adding the define.
|
||||||
|
if(BUILD_SDL)
|
||||||
|
add_definitions(-DBUILD_SDL)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(BUILD_QT)
|
if(BUILD_QT)
|
||||||
|
@ -24,6 +24,8 @@ if (NOT SDL2_FOUND AND NOT SDL_FOUND)
|
|||||||
return()
|
return()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
add_definitions(-DBUILD_SDL)
|
||||||
|
|
||||||
find_feature(USE_PIXMAN "pixman-1")
|
find_feature(USE_PIXMAN "pixman-1")
|
||||||
if(USE_PIXMAN)
|
if(USE_PIXMAN)
|
||||||
add_definitions(-DUSE_PIXMAN)
|
add_definitions(-DUSE_PIXMAN)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user