cmake: Fix building with -DSDL_POWER=Off Fixes Bugzilla #5193.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5604c92..b876fc6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -406,6 +406,7 @@ file(GLOB SOURCE_FILES
${SDL2_SOURCE_DIR}/src/file/*.c
${SDL2_SOURCE_DIR}/src/libm/*.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/stdlib/*.c
@@ -883,10 +884,6 @@ if(SDL_SENSOR)
file(GLOB SENSOR_SOURCES ${SDL2_SOURCE_DIR}/src/sensor/*.c)
set(SOURCE_FILES ${SOURCE_FILES} ${SENSOR_SOURCES})
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: