CMake: Fix compiling with Visual Studio

This commit is contained in:
Connor McLaughlin 2020-04-23 13:04:33 +10:00
parent a02c818245
commit fc6a165438
2 changed files with 4 additions and 2 deletions

View File

@ -18,16 +18,18 @@ if(WIN32)
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(SDL2_LIBRARIES "${CMAKE_CURRENT_SOURCE_DIR}/dep/msvc/sdl2/lib64/SDL2.lib")
set(SDL2MAIN_LIBRARIES "${CMAKE_CURRENT_SOURCE_DIR}/dep/msvc/sdl2/lib64/SDL2main.lib")
set(Qt5_DIR "${CMAKE_CURRENT_SOURCE_DIR}/dep/msvc/qt/5.14.0/msvc2017_64/lib/cmake/Qt5")
else()
set(SDL2_LIBRARIES "${CMAKE_CURRENT_SOURCE_DIR}/dep/msvc/sdl2/lib32/SDL2.lib")
set(SDL2MAIN_LIBRARIES "${CMAKE_CURRENT_SOURCE_DIR}/dep/msvc/sdl2/lib32/SDL2main.lib")
set(Qt5_DIR "${CMAKE_CURRENT_SOURCE_DIR}/dep/msvc/qt/5.14.0/msvc2017_32/lib/cmake/Qt5")
endif()
endif()
# Required libraries.
if(NOT ANDROID)
if(BUILD_SDL_FRONTEND OR USE_SDL2)
if(NOT WIN32 AND (BUILD_SDL_FRONTEND OR USE_SDL2))
find_package(SDL2 REQUIRED)
endif()
if(BUILD_QT_FRONTEND)

View File

@ -57,5 +57,5 @@ if(WIN32)
d3d11hostdisplay.cpp
d3d11hostdisplay.h
)
target_link_libraries(duckstation PRIVATE d3d11.lib dxgi.lib)
target_link_libraries(duckstation-qt PRIVATE d3d11.lib dxgi.lib)
endif()