all repos — mgba @ cd6065d78ba3c196668fcb3e82ab10a8297f8adf

mGBA Game Boy Advance Emulator

CMakeLists: Fix SDL-less build when there is no SDL on the system.
waddlesplash waddlesplash@gmail.com
Fri, 17 Mar 2017 16:50:01 -0400
commit

cd6065d78ba3c196668fcb3e82ab10a8297f8adf

parent

244779ed195851b03a82a39cee6101cca6bba6c8

2 files changed, 6 insertions(+), 1 deletions(-)

jump to
M CMakeLists.txtCMakeLists.txt

@@ -747,8 +747,11 @@ install(TARGETS ${BINARY_NAME}-openemu LIBRARY DESTINATION ${OE_LIBDIR} COMPONENT ${BINARY_NAME}.oecoreplugin NAMELINK_SKIP)

endif() if(BUILD_SDL) - add_definitions(-DBUILD_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() if(BUILD_QT)
M src/platform/sdl/CMakeLists.txtsrc/platform/sdl/CMakeLists.txt

@@ -24,6 +24,8 @@ set(BUILD_SDL OFF PARENT_SCOPE)

return() endif() +add_definitions(-DBUILD_SDL) + find_feature(USE_PIXMAN "pixman-1") if(USE_PIXMAN) add_definitions(-DUSE_PIXMAN)