cmake: Fix building with -DSDL_POWER=Off

Fixes Bugzilla #5193.
This commit is contained in:
Ryan C. Gordon 2020-06-26 15:04:57 -04:00
parent ce293eed8d
commit dd753ce7e3
1 changed files with 1 additions and 4 deletions

View File

@ -406,6 +406,7 @@ file(GLOB SOURCE_FILES
${SDL2_SOURCE_DIR}/src/file/*.c ${SDL2_SOURCE_DIR}/src/file/*.c
${SDL2_SOURCE_DIR}/src/libm/*.c ${SDL2_SOURCE_DIR}/src/libm/*.c
${SDL2_SOURCE_DIR}/src/locale/*.c ${SDL2_SOURCE_DIR}/src/locale/*.c
${SDL2_SOURCE_DIR}/src/power/*.c
${SDL2_SOURCE_DIR}/src/render/*.c ${SDL2_SOURCE_DIR}/src/render/*.c
${SDL2_SOURCE_DIR}/src/render/*/*.c ${SDL2_SOURCE_DIR}/src/render/*/*.c
${SDL2_SOURCE_DIR}/src/stdlib/*.c ${SDL2_SOURCE_DIR}/src/stdlib/*.c
@ -883,10 +884,6 @@ if(SDL_SENSOR)
file(GLOB SENSOR_SOURCES ${SDL2_SOURCE_DIR}/src/sensor/*.c) file(GLOB SENSOR_SOURCES ${SDL2_SOURCE_DIR}/src/sensor/*.c)
set(SOURCE_FILES ${SOURCE_FILES} ${SENSOR_SOURCES}) set(SOURCE_FILES ${SOURCE_FILES} ${SENSOR_SOURCES})
endif() endif()
if(SDL_POWER)
file(GLOB POWER_SOURCES ${SDL2_SOURCE_DIR}/src/power/*.c)
set(SOURCE_FILES ${SOURCE_FILES} ${POWER_SOURCES})
endif()
# TODO: in configure.ac, the test for LOADSO and SDL_DLOPEN is a bit weird: # TODO: in configure.ac, the test for LOADSO and SDL_DLOPEN is a bit weird: