mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -06:00
UnitTests: make it possible to build tests for code that has global dependencies
This commit is contained in:
@ -4,6 +4,9 @@ set(SRCS ControllerEmu.cpp
|
||||
ControllerInterface/Device.cpp
|
||||
ControllerInterface/ExpressionParser.cpp)
|
||||
|
||||
|
||||
set(LIBS common)
|
||||
|
||||
if(WIN32)
|
||||
set(SRCS ${SRCS}
|
||||
ControllerInterface/DInput/DInput.cpp
|
||||
@ -24,6 +27,7 @@ elseif(X11_FOUND)
|
||||
set(SRCS ${SRCS}
|
||||
ControllerInterface/Xlib/XInput2.cpp)
|
||||
endif()
|
||||
set(LIBS ${LIBS} ${X11_LIBRARIES} ${XINPUT2_LIBRARIES})
|
||||
elseif(ANDROID)
|
||||
set(SRCS ${SRCS}
|
||||
ControllerInterface/Android/Android.cpp)
|
||||
@ -31,6 +35,11 @@ endif()
|
||||
|
||||
if(SDL_FOUND OR SDL2_FOUND)
|
||||
set(SRCS ${SRCS} ControllerInterface/SDL/SDL.cpp)
|
||||
if (SDL2_FOUND)
|
||||
set(LIBS ${LIBS} ${SDL2_LIBRARY})
|
||||
elseif(SDL_FOUND)
|
||||
set(LIBS ${LIBS} ${SDL_LIBRARY})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
add_dolphin_library(inputcommon "${SRCS}" "")
|
||||
add_dolphin_library(inputcommon "${SRCS}" "${LIBS}")
|
||||
|
Reference in New Issue
Block a user