Adding support for WinRT(WinPhone 8/8.1 and Win Store) via CMake 3.1
- Substituted HAVE_WINRT with WINRT - Fixed compilation issues in ocl.cpp and parallel.cpp - Fixed compiler issue for WP8: "C2678: binary '+' : no operator found which takes a left-hand - Fixed gitignore - Added #ifdef HAVE_OPENCL to remove compiler warnings in ocl.cpp - Used NO_GETENV similar to '3rdparty\libjpeg\jmemmgr.c; - Added ole32.lib for core module (for WindowsStore 8.0 builds) - Made OpenCV_ARCH aware of ARM Signed-off-by: Maxim Kostin <v-maxkos@microsoft.com>
This commit is contained in:
@@ -64,7 +64,15 @@
|
||||
// TODO Move to some common place
|
||||
static bool getBoolParameter(const char* name, bool defaultValue)
|
||||
{
|
||||
/*
|
||||
* If your system doesn't support getenv(), define NO_GETENV to disable
|
||||
* this feature.
|
||||
*/
|
||||
#ifdef NO_GETENV
|
||||
const char* envValue = NULL;
|
||||
#else
|
||||
const char* envValue = getenv(name);
|
||||
#endif
|
||||
if (envValue == NULL)
|
||||
{
|
||||
return defaultValue;
|
||||
@@ -85,7 +93,7 @@ static bool getBoolParameter(const char* name, bool defaultValue)
|
||||
// TODO Move to some common place
|
||||
static size_t getConfigurationParameterForSize(const char* name, size_t defaultValue)
|
||||
{
|
||||
#ifdef HAVE_WINRT
|
||||
#ifdef NO_GETENV
|
||||
const char* envValue = NULL;
|
||||
#else
|
||||
const char* envValue = getenv(name);
|
||||
@@ -728,7 +736,7 @@ static void* initOpenCLAndLoad(const char* funcname)
|
||||
static HMODULE handle = 0;
|
||||
if (!handle)
|
||||
{
|
||||
#ifndef HAVE_WINRT
|
||||
#ifndef WINRT
|
||||
if(!initialized)
|
||||
{
|
||||
handle = LoadLibraryA("OpenCL.dll");
|
||||
@@ -2190,6 +2198,7 @@ inline cl_int getStringInfo(Functor f, ObjectType obj, cl_uint name, std::string
|
||||
return CL_SUCCESS;
|
||||
}
|
||||
|
||||
#ifdef HAVE_OPENCL
|
||||
static void split(const std::string &s, char delim, std::vector<std::string> &elems)
|
||||
{
|
||||
elems.clear();
|
||||
@@ -2230,8 +2239,9 @@ static bool parseOpenCLDeviceConfiguration(const std::string& configurationStr,
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_WINRT
|
||||
#ifdef WINRT
|
||||
static cl_device_id selectOpenCLDevice()
|
||||
{
|
||||
return NULL;
|
||||
|
Reference in New Issue
Block a user