cmake_minimum_required(VERSION 2.6)
-# Paths to dependencies
-set(DELIBS_DIR "framework/delibs" CACHE STRING "Path to delibs (../delibs).")
-
# dEQP Target.
set(DEQP_TARGET "default" CACHE STRING "dEQP Target (default, android...)")
project(dEQP-Core-${DEQP_TARGET})
-include(${DELIBS_DIR}/cmake/Defs.cmake NO_POLICY_SCOPE)
-include(${DELIBS_DIR}/cmake/CFlags.cmake)
+include(framework/delibs/cmake/Defs.cmake NO_POLICY_SCOPE)
+include(framework/delibs/cmake/CFlags.cmake)
add_definitions(-DDE_ASSERT_FAILURE_CALLBACK)
set(DEQP_SUPPORT_EGL OFF) # Is EGL supported
set(DEQP_EGL_LIBRARIES ) # EGL libraries
-set(DEQP_SUPPORT_OPENCL OFF) # Is OpenCL supported
-set(DEQP_OPENCL_LIBRARIES ) # OpenCL libraries
-
set(DEQP_PLATFORM_LIBRARIES ) # Other platform libraries
set(DEQP_SUPPORT_OPENGL OFF) # Is OpenGL supported on platform
# Delibs include directories
include_directories(
- ${DELIBS_DIR}/debase
- ${DELIBS_DIR}/decpp
- ${DELIBS_DIR}/depool
- ${DELIBS_DIR}/dethread
- ${DELIBS_DIR}/deutil
- ${DELIBS_DIR}/destream
+ framework/delibs/debase
+ framework/delibs/decpp
+ framework/delibs/depool
+ framework/delibs/dethread
+ framework/delibs/deutil
+ framework/delibs/destream
)
# Include target-specific definitions
message(STATUS "DEQP_VG_LIBRARIES = ${DEQP_VG_LIBRARIES}")
message(STATUS "DEQP_SUPPORT_EGL = ${DEQP_SUPPORT_EGL}")
message(STATUS "DEQP_EGL_LIBRARIES = ${DEQP_EGL_LIBRARIES}")
-message(STATUS "DEQP_SUPPORT_OPENCL = ${DEQP_SUPPORT_OPENCL}")
-message(STATUS "DEQP_OPENCL_LIBRARIES = ${DEQP_OPENCL_LIBRARIES}")
message(STATUS "DEQP_SUPPORT_OPENGL = ${DEQP_SUPPORT_OPENGL}")
message(STATUS "DEQP_PLATFORM_LIBRARIES = ${DEQP_PLATFORM_LIBRARIES}")
add_definitions(-DDEQP_SUPPORT_EGL=1)
endif ()
-if (DEQP_SUPPORT_OPENCL)
- add_definitions(-DDEQP_SUPPORT_OPENCL=1)
-endif ()
-
if (DEQP_SUPPORT_OPENGL)
add_definitions(-DDEQP_SUPPORT_OPENGL=1)
endif ()
add_definitions(-DDEQP_EGL_RUNTIME_LOAD=1)
endif ()
-if (DEQP_SUPPORT_OPENCL AND NOT DEFINED DEQP_OPENCL_LIBRARIES)
- message(FATAL_ERROR "Run-time loading of OpenCL is not supported (DEQP_OPENCL_LIBRARIES is not set)")
-endif ()
-
# OpenGL is always loaded on run-time
if (DEQP_SUPPORT_OPENGL)
add_definitions(-DDEQP_OPENGL_RUNTIME_LOAD=1)
endif ()
# delibs projects
-add_subdirectory(${DELIBS_DIR}/debase debase)
-add_subdirectory(${DELIBS_DIR}/depool depool)
-add_subdirectory(${DELIBS_DIR}/dethread dethread)
-add_subdirectory(${DELIBS_DIR}/destream destream)
-add_subdirectory(${DELIBS_DIR}/deutil deutil)
-add_subdirectory(${DELIBS_DIR}/decpp decpp)
+add_subdirectory(framework/delibs/debase)
+add_subdirectory(framework/delibs/depool)
+add_subdirectory(framework/delibs/dethread)
+add_subdirectory(framework/delibs/destream)
+add_subdirectory(framework/delibs/deutil)
+add_subdirectory(framework/delibs/decpp)
# ExecServer
add_subdirectory(execserver)
add_subdirectory(executor)
endif ()
-if (DEQP_SUPPORT_OPENCL)
- # We need to support all older CL1.x versions
- add_definitions(-DCL_USE_DEPRECATED_OPENCL_1_0_APIS)
- add_definitions(-DCL_USE_DEPRECATED_OPENCL_1_1_APIS)
-endif ()
-
# Test framework include directories
include_directories(
framework/common
set(DEQP_TARGET_NAME "Default")
-# OpenGL (ES) tests do not require any libraries or headers
+# OpenGL (ES) & EGL tests do not require any libraries or headers
set(DEQP_SUPPORT_GLES2 ON)
set(DEQP_SUPPORT_GLES3 ON)
set(DEQP_SUPPORT_OPENGL ON)
+set(DEQP_SUPPORT_EGL ON)
# For static linking
find_library(GLES2_LIBRARY NAMES libGLESv2 GLESv2)
if (GLES2_LIBRARY AND GLES2_INCLUDE_PATH)
set(DEQP_GLES2_LIBRARIES ${GLES2_LIBRARY})
+ include_directories(${GLES2_INCLUDE_PATH})
endif ()
if (GLES2_LIBRARY AND GLES3_INCLUDE_PATH)
endif ()
if (EGL_LIBRARY AND EGL_INCLUDE_PATH)
- set(DEQP_SUPPORT_EGL ON)
- set(DEQP_EGL_LIBRARIES ${EGL_LIBRARY})
+ set(DEQP_EGL_LIBRARIES ${EGL_LIBRARY})
include_directories(${EGL_INCLUDE_PATH})
endif ()
-# OpenCL support?
-find_library(OPENCL_LIBRARY NAMES libOpenCL OpenCL)
-find_path(OPENCL_INCLUDE_PATH CL/cl.h OpenCL/cl.h)
-
-message("OPENCL_LIBRARY = ${OPENCL_LIBRARY}")
-message("OPENCL_INCLUDE_PATH = ${OPENCL_INCLUDE_PATH}")
-
-if (OPENCL_LIBRARY AND OPENCL_INCLUDE_PATH)
- set(DEQP_SUPPORT_OPENCL ON)
- set(DEQP_OPENCL_LIBRARIES ${OPENCL_LIBRARY})
- include_directories(${OPENCL_INCLUDE_PATH})
-endif ()
-
# X11 / GLX?
if (DE_OS_IS_UNIX)
find_package(X11)
set(DEQP_TARGET_NAME "OS X")
set(DEQP_SUPPORT_OPENGL ON)
-set(DEQP_SUPPORT_OPENCL ON)
find_package(OpenGL REQUIRED)
set(DEQP_PLATFORM_LIBRARIES ${OPENGL_LIBRARIES})
include_directories(${OPENGL_INCLUDE_DIRS})
-
-find_path(OPENCL_INC NAMES CL/cl.h OpenCL/cl.h)
-if (NOT OPENCL_INC)
- message(FATAL_ERROR "Can't find OpenCL headers")
-endif ()
-include_directories(${OPENCL_INC})
-
-find_library(OPENCL_LIB NAMES OpenCL libOpenCL)
-set(DEQP_OPENCL_LIBRARIES ${OPENCL_LIB})
-
-# Apple versions of cl headers do not respect CL_USE_DEPRECATED_OPENCL_1_X_APIs
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations")