diff options
| author | Pierre Bourdon <delroth@gmail.com> | 2014-08-01 23:23:52 -0700 |
|---|---|---|
| committer | Pierre Bourdon <delroth@gmail.com> | 2014-08-02 09:34:39 -0700 |
| commit | 8b26d7bf1ef478ff2f06d3cf0b0712418d1a8627 (patch) | |
| tree | 9611fbdb109eb470136d827aae43b5d9bfae7d0d /Source/Core | |
| parent | 226a9c239220c5ba99508a6b96ce28903a35be80 (diff) | |
UnitTests: make it possible to build tests for code that has global dependencies
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/Common/CMakeLists.txt | 7 | ||||
| -rw-r--r-- | Source/Core/Core/CMakeLists.txt | 15 | ||||
| -rw-r--r-- | Source/Core/DolphinWX/CMakeLists.txt | 29 | ||||
| -rw-r--r-- | Source/Core/InputCommon/CMakeLists.txt | 11 |
4 files changed, 32 insertions, 30 deletions
diff --git a/Source/Core/Common/CMakeLists.txt b/Source/Core/Common/CMakeLists.txt index f375661e0b..d5974ecca6 100644 --- a/Source/Core/Common/CMakeLists.txt +++ b/Source/Core/Common/CMakeLists.txt @@ -48,6 +48,11 @@ if(WIN32) set(SRCS ${SRCS} ExtendedTrace.cpp) endif(WIN32) +set(LIBS "${CMAKE_THREAD_LIBS_INIT}") +if((NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin") AND (NOT ANDROID)) + set(LIBS ${LIBS} rt) +endif() + enable_precompiled_headers(stdafx.h stdafx.cpp SRCS) -add_dolphin_library(common "${SRCS}" "${CMAKE_THREAD_LIBS_INIT}") +add_dolphin_library(common "${SRCS}" "${LIBS}") diff --git a/Source/Core/Core/CMakeLists.txt b/Source/Core/Core/CMakeLists.txt index 77f778c877..1bf53a0519 100644 --- a/Source/Core/Core/CMakeLists.txt +++ b/Source/Core/Core/CMakeLists.txt @@ -221,7 +221,18 @@ if(_M_ARM_32) ) endif() -set(LIBS bdisasm inputcommon videoogl videosoftware sfml-network) +set(LIBS + audiocommon + bdisasm + common + discio + inputcommon + ${LZO} + sfml-network + videoogl + videosoftware + z + ) if(LIBUSB_FOUND) # Using shared LibUSB @@ -236,6 +247,8 @@ if(WIN32) HW/WiimoteReal/IOWin.cpp) elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") set(SRCS ${SRCS} HW/BBA-TAP/TAP_Apple.cpp HW/WiimoteReal/IOdarwin.mm) + set(LIBS ${LIBS} + ${IOB_LIBRARY}) elseif(UNIX) set(SRCS ${SRCS} HW/BBA-TAP/TAP_Unix.cpp) if((${CMAKE_SYSTEM_NAME} MATCHES "Linux") AND BLUEZ_FOUND) diff --git a/Source/Core/DolphinWX/CMakeLists.txt b/Source/Core/DolphinWX/CMakeLists.txt index 6d044d3279..b7d23eac90 100644 --- a/Source/Core/DolphinWX/CMakeLists.txt +++ b/Source/Core/DolphinWX/CMakeLists.txt @@ -4,41 +4,17 @@ endif() set(LIBS core ${LZO} - discio - bdisasm - inputcommon - common - audiocommon - z - sfml-network ${GTK2_LIBRARIES}) -if((NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin") AND (NOT ANDROID)) - set(LIBS ${LIBS} rt) -endif() - if(NOT ANDROID) if(USE_X11) - set(LIBS ${LIBS} ${X11_LIBRARIES} - ${XINPUT2_LIBRARIES} - ${XRANDR_LIBRARIES}) + set(LIBS ${LIBS} ${XRANDR_LIBRARIES}) endif() if(USE_WAYLAND) - set(LIBS ${LIBS} ${WAYLAND_LIBRARIES} - ${XKBCOMMON_LIBRARIES}) + set(LIBS ${LIBS} ${WAYLAND_LIBRARIES} ${XKBCOMMON_LIBRARIES}) endif() link_directories(${CMAKE_PREFIX_PATH}/lib) - - if(SDL2_FOUND) - # Using shared SDL2 - set(LIBS ${LIBS} ${SDL2_LIBRARY}) - else(SDL2_FOUND) - if(SDL_FOUND) - # Using shared SDL - set(LIBS ${LIBS} ${SDL_LIBRARY}) - endif() - endif() else() set(LIBS ${LIBS} png iconv) endif() @@ -135,7 +111,6 @@ elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") ${COREAUDIO_LIBRARY} ${COREFUND_LIBRARY} ${CORESERV_LIBRARY} - ${IOB_LIBRARY} ${IOK_LIBRARY} ${FORCEFEEDBACK} ) 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}") |
