mirror of
https://github.com/opencv/opencv.git
synced 2025-06-09 18:43:05 +08:00
ocl: fix world compilation on Windows
This commit is contained in:
parent
ec24091578
commit
88225eb65e
@ -44,13 +44,7 @@
|
|||||||
|
|
||||||
#ifdef HAVE_CLAMDBLAS
|
#ifdef HAVE_CLAMDBLAS
|
||||||
|
|
||||||
#ifndef CL_RUNTIME_EXPORT
|
#include "opencl_core.hpp"
|
||||||
#if (defined(BUILD_SHARED_LIBS) || defined(OPENCV_CORE_SHARED)) && (defined _WIN32 || defined WINCE)
|
|
||||||
#define CL_RUNTIME_EXPORT __declspec(dllimport)
|
|
||||||
#else
|
|
||||||
#define CL_RUNTIME_EXPORT
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "autogenerated/opencl_clamdblas.hpp"
|
#include "autogenerated/opencl_clamdblas.hpp"
|
||||||
|
|
||||||
|
@ -44,13 +44,7 @@
|
|||||||
|
|
||||||
#ifdef HAVE_CLAMDFFT
|
#ifdef HAVE_CLAMDFFT
|
||||||
|
|
||||||
#ifndef CL_RUNTIME_EXPORT
|
#include "opencl_core.hpp"
|
||||||
#if (defined(BUILD_SHARED_LIBS) || defined(OPENCV_CORE_SHARED)) && (defined _WIN32 || defined WINCE)
|
|
||||||
#define CL_RUNTIME_EXPORT __declspec(dllimport)
|
|
||||||
#else
|
|
||||||
#define CL_RUNTIME_EXPORT
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "autogenerated/opencl_clamdfft.hpp"
|
#include "autogenerated/opencl_clamdfft.hpp"
|
||||||
|
|
||||||
|
@ -45,7 +45,8 @@
|
|||||||
#ifdef HAVE_OPENCL
|
#ifdef HAVE_OPENCL
|
||||||
|
|
||||||
#ifndef CL_RUNTIME_EXPORT
|
#ifndef CL_RUNTIME_EXPORT
|
||||||
#if (defined(BUILD_SHARED_LIBS) || defined(OPENCV_CORE_SHARED)) && (defined _WIN32 || defined WINCE)
|
#if (defined(BUILD_SHARED_LIBS) || defined(OPENCV_CORE_SHARED)) && (defined _WIN32 || defined WINCE) && \
|
||||||
|
!(defined(__OPENCV_BUILD) && defined(OPENCV_MODULE_IS_PART_OF_WORLD))
|
||||||
#define CL_RUNTIME_EXPORT __declspec(dllimport)
|
#define CL_RUNTIME_EXPORT __declspec(dllimport)
|
||||||
#else
|
#else
|
||||||
#define CL_RUNTIME_EXPORT
|
#define CL_RUNTIME_EXPORT
|
||||||
|
@ -59,6 +59,8 @@ ocv_module_include_directories()
|
|||||||
#message(STATUS "${OPENCV_MODULE_${the_module}_SOURCES}")
|
#message(STATUS "${OPENCV_MODULE_${the_module}_SOURCES}")
|
||||||
ocv_create_module(${link_deps})
|
ocv_create_module(${link_deps})
|
||||||
|
|
||||||
|
ocv_target_compile_definitions(${the_module} PRIVATE OPENCV_MODULE_IS_PART_OF_WORLD=1)
|
||||||
|
|
||||||
if(BUILD_opencv_imgcodecs AND OPENCV_MODULE_opencv_imgcodecs_IS_PART_OF_WORLD)
|
if(BUILD_opencv_imgcodecs AND OPENCV_MODULE_opencv_imgcodecs_IS_PART_OF_WORLD)
|
||||||
ocv_imgcodecs_configure_target()
|
ocv_imgcodecs_configure_target()
|
||||||
endif()
|
endif()
|
||||||
|
Loading…
Reference in New Issue
Block a user