mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-09-06 01:26:05 +00:00
UnitTests: make it possible to build tests for code that has global dependencies
This commit is contained in:
parent
226a9c2392
commit
8b26d7bf1e
9 changed files with 93 additions and 41 deletions
|
@ -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}")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue