mirror of https://github.com/encounter/SDL.git
Fixed bug 2187 - CMake is not adding src/core/linux/*.c to the build, linking to SDL results in errors.
Daniel Ribeiro Maciel CMake is not adding src/core/linux/*.c to the build, linking to SDL results in errors: (...)/libSDL2-2.0.so.1.0.1: undefined reference to `SDL_UDEV_AddCallback' (...)/libSDL2-2.0.so.1.0.1: undefined reference to `SDL_UDEV_Poll' (...)/libSDL2-2.0.so.1.0.1: undefined reference to `SDL_UDEV_Init' (...)/libSDL2-2.0.so.1.0.1: undefined reference to `SDL_UDEV_Quit' (...)/libSDL2-2.0.so.1.0.1: undefined reference to `SDL_UDEV_DelCallback' (...)/libSDL2-2.0.so.1.0.1: undefined reference to `SDL_UDEV_Scan' collect2: error: ld returned 1 exit status
This commit is contained in:
parent
f2224e1fc7
commit
aaa4165b9f
|
@ -648,6 +648,10 @@ if(UNIX AND NOT APPLE)
|
||||||
#error EVIOCGNAME() ioctl not available
|
#error EVIOCGNAME() ioctl not available
|
||||||
#endif
|
#endif
|
||||||
int main(int argc, char** argv) {}" HAVE_INPUT_EVENTS)
|
int main(int argc, char** argv) {}" HAVE_INPUT_EVENTS)
|
||||||
|
|
||||||
|
file(GLOB CORE_SOURCES ${SDL2_SOURCE_DIR}/src/core/linux/*.c)
|
||||||
|
set(SOURCE_FILES ${SOURCE_FILES} ${CORE_SOURCES})
|
||||||
|
|
||||||
if(HAVE_INPUT_EVENTS)
|
if(HAVE_INPUT_EVENTS)
|
||||||
set(SDL_INPUT_LINUXEV 1)
|
set(SDL_INPUT_LINUXEV 1)
|
||||||
endif(HAVE_INPUT_EVENTS)
|
endif(HAVE_INPUT_EVENTS)
|
||||||
|
@ -746,8 +750,8 @@ elseif(WINDOWS)
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
int main(int argc, char **argv) { }" HAVE_WIN32_CC)
|
int main(int argc, char **argv) { }" HAVE_WIN32_CC)
|
||||||
|
|
||||||
file(GLOB WIN_SOURCES ${SDL2_SOURCE_DIR}/src/core/windows/*.c)
|
file(GLOB CORE_SOURCES ${SDL2_SOURCE_DIR}/src/core/windows/*.c)
|
||||||
set(SOURCE_FILES ${SOURCE_FILES} ${WIN_SOURCES})
|
set(SOURCE_FILES ${SOURCE_FILES} ${CORE_SOURCES})
|
||||||
|
|
||||||
# Check for DirectX
|
# Check for DirectX
|
||||||
if(DIRECTX)
|
if(DIRECTX)
|
||||||
|
|
Loading…
Reference in New Issue