summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon
diff options
context:
space:
mode:
authorPierre Bourdon <delroth@gmail.com>2014-08-01 23:23:52 -0700
committerPierre Bourdon <delroth@gmail.com>2014-08-02 09:34:39 -0700
commit8b26d7bf1ef478ff2f06d3cf0b0712418d1a8627 (patch)
tree9611fbdb109eb470136d827aae43b5d9bfae7d0d /Source/Core/InputCommon
parent226a9c239220c5ba99508a6b96ce28903a35be80 (diff)
UnitTests: make it possible to build tests for code that has global dependencies
Diffstat (limited to 'Source/Core/InputCommon')
-rw-r--r--Source/Core/InputCommon/CMakeLists.txt11
1 files changed, 10 insertions, 1 deletions
diff --git a/Source/Core/InputCommon/CMakeLists.txt b/Source/Core/InputCommon/CMakeLists.txt
index 6b771c38e1..92fce634e3 100644
--- a/Source/Core/InputCommon/CMakeLists.txt
+++ b/Source/Core/InputCommon/CMakeLists.txt
@@ -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}")