Make dependency on cuda development files optional

This commit is contained in:
loki-47-6F-64
2021-09-22 14:17:08 +02:00
parent bb912786bd
commit d0529fb234
5 changed files with 53 additions and 36 deletions

View File

@@ -1,10 +1,14 @@
#ifndef SUNSHINE_PLATFORM_CUDA_H
#if !defined(SUNSHINE_PLATFORM_CUDA_H) && defined(SUNSHINE_BUILD_CUDA)
#define SUNSHINE_PLATFORM_CUDA_H
#ifndef __NVCC__
#include <vector>
#include <memory>
#include <optional>
#include "sunshine/platform/common.h"
#include "x11grab.h"
namespace platf {
class hwdevice_t;
class img_t;
}
namespace cuda {
namespace nvfbc {
@@ -14,12 +18,6 @@ std::shared_ptr<platf::hwdevice_t> make_hwdevice(int width, int height, bool vra
int init();
} // namespace cuda
#else
namespace platf {
class img_t;
}
#endif
typedef struct cudaArray *cudaArray_t;
#if !defined(__CUDACC__)