From a97230c76bda23e990109e27a76012c7812d49a1 Mon Sep 17 00:00:00 2001 From: Alexey Lysenko Date: Wed, 12 Feb 2020 16:11:18 +0100 Subject: [PATCH] Updated Joystick CMakeLists.txt file to compile on windows --- src/Joystick/CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Joystick/CMakeLists.txt b/src/Joystick/CMakeLists.txt index f7536972b..01a85c4eb 100644 --- a/src/Joystick/CMakeLists.txt +++ b/src/Joystick/CMakeLists.txt @@ -25,17 +25,17 @@ target_link_libraries(Joystick target_include_directories(Joystick PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) if(WIN32) - include_directories(libs/lib/sdl2/msvc/include) + include_directories(${CMAKE_SOURCE_DIR}/libs/sdl2/msvc/include) # Support both 32 and 64 bit builds if (${CMAKE_SIZEOF_VOID_P} MATCHES 8) - set(SDL2_LIBRARIES "${CMAKE_SOURCE_DIR}/libs/lib/sdl2/msvc/lib/x64/SDL2.lib;${CMAKE_SOURCE_DIR}/libs/lib/sdl2/msvc/lib/x64/SDL2main.lib") + set(SDL2_LIBRARIES "${CMAKE_SOURCE_DIR}/libs/sdl2/msvc/lib/x64/SDL2.lib;${CMAKE_SOURCE_DIR}/libs/sdl2/msvc/lib/x64/SDL2main.lib") else () - set(SDL2_LIBRARIES "${CMAKE_SOURCE_DIR}/libs/lib/sdl2/msvc/lib/x86/SDL2.lib;${CMAKE_SOURCE_DIR}/libs/lib/sdl2/msvc/lib/x86/SDL2main.lib") + set(SDL2_LIBRARIES "${CMAKE_SOURCE_DIR}/libs/sdl2/msvc/lib/x86/SDL2.lib;${CMAKE_SOURCE_DIR}/libs/sdl2/msvc/lib/x86/SDL2main.lib") endif () string(STRIP "${SDL2_LIBRARIES}" SDL2_LIBRARIES) - target_link_libraries(Joystick ${SDL2_LIBRARIES}) + target_link_libraries(Joystick PUBLIC ${SDL2_LIBRARIES}) else() find_package(SDL2 REQUIRED) if (IS_DIRECTORY ${SDL2_INCLUDE_DIRS}) -- 2.22.0