cmake: add core/unix sources to the build.

Fixes Bugzilla #3757.
Ryan C. Gordon 2017-08-17 15:44:47 -04:00
parent 00905c98be
commit 47beda9767
1 changed files with 7 additions and 2 deletions

View File

@ -948,6 +948,11 @@ elseif(UNIX AND NOT APPLE AND NOT ANDROID)
CheckKMSDRM() CheckKMSDRM()
endif() endif()
if(UNIX)
file(GLOB CORE_UNIX_SOURCES ${SDL2_SOURCE_DIR}/src/core/unix/*.c)
set(SOURCE_FILES ${SOURCE_FILES} ${CORE_UNIX_SOURCES})
endif()
if(LINUX) if(LINUX)
check_c_source_compiles(" check_c_source_compiles("
#include <linux/input.h> #include <linux/input.h>
@ -967,8 +972,8 @@ elseif(UNIX AND NOT APPLE AND NOT ANDROID)
ioctl(0, KDGKBENT, &kbe); ioctl(0, KDGKBENT, &kbe);
}" HAVE_INPUT_KD) }" HAVE_INPUT_KD)
file(GLOB CORE_SOURCES ${SDL2_SOURCE_DIR}/src/core/linux/*.c) file(GLOB CORE_LINUX_SOURCES ${SDL2_SOURCE_DIR}/src/core/linux/*.c)
set(SOURCE_FILES ${SOURCE_FILES} ${CORE_SOURCES}) set(SOURCE_FILES ${SOURCE_FILES} ${CORE_LINUX_SOURCES})
if(HAVE_INPUT_EVENTS) if(HAVE_INPUT_EVENTS)
set(SDL_INPUT_LINUXEV 1) set(SDL_INPUT_LINUXEV 1)