mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-02-21 22:54:16 +01:00
[meson] Use dependency() instead of find_library() for SDL2/GLFW detection.
Since we're not linking to the libraries anymore, it doesn't make much sense to use find_library, and in fact we need to use dependency() in order to get the right CFLAGS for includes, defines, etc, so use that instead. As a result, we can remove the 'SDL2/' folders from the includes, making the SDL includes more correct.
This commit is contained in:
parent
d5d236a1e2
commit
6259e86392
@ -1,6 +1,6 @@
|
|||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
||||||
#include <SDL2/SDL.h>
|
#include <SDL.h>
|
||||||
|
|
||||||
namespace dxvk::wsi {
|
namespace dxvk::wsi {
|
||||||
|
|
||||||
@ -22,4 +22,4 @@ namespace dxvk::wsi {
|
|||||||
return reinterpret_cast<HMONITOR>(static_cast<intptr_t>(displayId + 1));
|
return reinterpret_cast<HMONITOR>(static_cast<intptr_t>(displayId + 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -127,8 +127,8 @@ else
|
|||||||
'./include/native/directx'
|
'./include/native/directx'
|
||||||
]
|
]
|
||||||
|
|
||||||
lib_sdl2 = cpp.find_library('SDL2', required: false)
|
lib_sdl2 = dependency('SDL2', required: false)
|
||||||
lib_glfw = cpp.find_library('glfw', required: false)
|
lib_glfw = dependency('glfw', required: false)
|
||||||
if lib_sdl2.found()
|
if lib_sdl2.found()
|
||||||
compiler_args += ['-DDXVK_WSI_SDL2']
|
compiler_args += ['-DDXVK_WSI_SDL2']
|
||||||
endif
|
endif
|
||||||
|
@ -14,6 +14,13 @@ wsi_src = [
|
|||||||
|
|
||||||
wsi_deps = [ dep_displayinfo ]
|
wsi_deps = [ dep_displayinfo ]
|
||||||
|
|
||||||
|
if platform != 'windows'
|
||||||
|
wsi_deps += [
|
||||||
|
lib_sdl2.partial_dependency(compile_args: true, includes: true),
|
||||||
|
lib_glfw.partial_dependency(compile_args: true, includes: true),
|
||||||
|
]
|
||||||
|
endif
|
||||||
|
|
||||||
wsi_lib = static_library('wsi', wsi_src,
|
wsi_lib = static_library('wsi', wsi_src,
|
||||||
dependencies : wsi_deps,
|
dependencies : wsi_deps,
|
||||||
include_directories : [ dxvk_include_path ])
|
include_directories : [ dxvk_include_path ])
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <SDL2/SDL.h>
|
#include <SDL.h>
|
||||||
|
|
||||||
#include "../wsi_platform.h"
|
#include "../wsi_platform.h"
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
#include "../../util/log/log.h"
|
#include "../../util/log/log.h"
|
||||||
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <SDL2/SDL_vulkan.h>
|
#include <SDL_vulkan.h>
|
||||||
|
|
||||||
namespace dxvk::wsi {
|
namespace dxvk::wsi {
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user