mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
cl12: GL sharing: Fix WIN compilation and add some clarification. (#333)
* Fix WIN compilation and add some clarification. * Add CLConform_GL_LIBRARIES_DIR CmakeLists variable for GL support * GL sharing tests - library names justification * Fix compilation errors function are overridden in glext.h. * fix cl12 - Add CLConform_GL_LIBRARIES_DIR CmakeLists variable for GL support
This commit is contained in:
committed by
Kévin Petit
parent
917aaf9159
commit
0e8f01a2f5
@@ -30,9 +30,8 @@
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#endif
|
||||
#include <GL/glew.h>
|
||||
#include <GL/glew.h>
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glext.h>
|
||||
#ifdef _WIN32
|
||||
#include <GL/glut.h>
|
||||
#else
|
||||
|
||||
@@ -21,8 +21,6 @@
|
||||
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glut.h>
|
||||
#include <GL/glext.h>
|
||||
#include <GL/glut.h>
|
||||
#include <CL/cl_ext.h>
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetGLContextInfoKHR_fn)(
|
||||
|
||||
@@ -4,6 +4,11 @@ option(D3D10_IS_SUPPORTED "Run DirectX 10 interop tests" OFF)
|
||||
option(D3D11_IS_SUPPORTED "Run DirectX 11 interop tests" OFF)
|
||||
option(GL_IS_SUPPORTED "Run OpenGL interop tests" OFF)
|
||||
|
||||
# CLConform_GL_LIBRARIES_DIR - path to OpenGL libraries
|
||||
if(GL_IS_SUPPORTED AND CLConform_GL_LIBRARIES_DIR)
|
||||
link_directories(${CLConform_GL_LIBRARIES_DIR})
|
||||
endif (GL_IS_SUPPORTED AND CLConform_GL_LIBRARIES_DIR)
|
||||
|
||||
if(MSVC)
|
||||
# The CTS will not link on MSVC 32-bit builds. To workaround this, add the
|
||||
# /LARGEADDRESSAWARE option as a linker flag. This is automatically set for
|
||||
|
||||
@@ -1,7 +1,13 @@
|
||||
if(WIN32)
|
||||
list(APPEND CLConform_LIBRARIES glut32 opengl32 glu32 )
|
||||
# Windows MSVC/Intel compiler hits:
|
||||
# - dwonload free libraries package glew and glut/freeglut from the Internet
|
||||
# - add x64/x86 binaries with glew and glut/freeglut libraries (.lib) to the directory lib/x64 or lib/x86.
|
||||
# Include folder libs as cmake argument -DCLConform_GL_LIBRARIES_DIR=lib\x64 while solution generation
|
||||
# - GL headers files should be added to project source directory and GL subdirectory
|
||||
# - Add .dll files: glut glew to the test binary location.
|
||||
list(APPEND CLConform_LIBRARIES opengl32 freeglut glew32)
|
||||
else(WIN32)
|
||||
list(APPEND CLConform_LIBRARIES GL glut GLEW GLU)
|
||||
list(APPEND CLConform_LIBRARIES GL glut GLEW GLU)
|
||||
endif(WIN32)
|
||||
|
||||
set (GL_SOURCES
|
||||
@@ -29,7 +35,7 @@ set (GL_SOURCES
|
||||
../../test_common/harness/mt19937.c
|
||||
../../test_common/harness/testHarness.c
|
||||
../../test_common/harness/threadTesting.c
|
||||
../../test_common/harness/imageHelpers.cpp
|
||||
../../test_common/harness/msvc9.c
|
||||
)
|
||||
|
||||
if (WIN32)
|
||||
@@ -49,13 +55,6 @@ if(MINGW)
|
||||
include_directories("./GLEW/")
|
||||
endif(MINGW)
|
||||
|
||||
if (MSVC)
|
||||
if(CMAKE_CL_64)
|
||||
list(APPEND CLConform_LIBRARIES glew64)
|
||||
else(CMAKE_CL_64)
|
||||
list(APPEND CLConform_LIBRARIES glew32)
|
||||
endif(CMAKE_CL_64)
|
||||
endif(MSVC)
|
||||
|
||||
add_executable(conformance_test_gl
|
||||
${GL_SOURCES} ${GLUT_SOURCES})
|
||||
|
||||
Reference in New Issue
Block a user