<commit_before># dEQP cmake file

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)

add_definitions(-DDE_ASSERT_FAILURE_CALLBACK)

# dEQP-specific configuration. Target file should override these.
set(DEQP_TARGET_NAME		"UNKNOWN")		# Target name

set(DEQP_SUPPORT_GLES1		OFF)			# Is GLESv1 supported
set(DEQP_GLES1_LIBRARIES	)				# GLESv1 libraries

set(DEQP_SUPPORT_GLES2		OFF)			# Is GLESv2 supported
set(DEQP_GLES2_LIBRARIES	)				# GLESv2 libraries. If empty, run-time linking is used

set(DEQP_SUPPORT_GLES3		OFF)			# Is GLESv3 supported
set(DEQP_GLES3_LIBRARIES	)				# GLESv3 libraries. If empty, run-time linking is used

set(DEQP_SUPPORT_VG			OFF)			# Is VG supported
set(DEQP_VG_LIBRARIES		)				# VG libraries

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
											# \note OpenGL is always loaded on run-time

set(DEQP_PLATFORM_COPY_LIBRARIES	)		# Libraries / binaries that need to be copied to binary directory

# Delibs include directories
include_directories(
	${DELIBS_DIR}/debase
	${DELIBS_DIR}/decpp
	${DELIBS_DIR}/depool
	${DELIBS_DIR}/dethread
	${DELIBS_DIR}/deutil
	${DELIBS_DIR}/destream
	)

# Include target-specific definitions
include(targets/${DEQP_TARGET}/${DEQP_TARGET}.cmake)

# zlib
find_path(ZLIB_INCLUDE_PATH	zlib.h)
find_library(ZLIB_LIBRARY	z)

if (NOT ZLIB_INCLUDE_PATH OR NOT ZLIB_LIBRARY)
	message(STATUS "System version of zlib not found, using external/zlib")
	add_subdirectory(external/zlib)
	# \note ZLIB_LIBRARY and ZLIB_INCLUDE_PATH are promoted from external/zlib/CMakeLists.txt
endif ()

include_directories(${ZLIB_INCLUDE_PATH})

# libpng
find_path(PNG_INCLUDE_PATH	libpng.h)
find_library(PNG_LIBRARY	png)

if (NOT PNG_INCLUDE_PATH OR NOT PNG_LIBRARY)
	message(STATUS "System version of libpng not found, using external/libpng")
	add_subdirectory(external/libpng)
	# \note PNG_LIBRARY and PNG_INCLUDE_PATH are promoted from external/libpng/CMakeLists.txt
endif ()

include_directories(${PNG_INCLUDE_PATH})

# \todo [2013-04-14 pyry] Remove once we've got dynamic loading of GL libraries figured out
if (DEQP_RUNTIME_LINK)
	include_directories(wrappers/dynlib/inc)

	if (DEQP_SUPPORT_GLES3)
		set(DEQP_GLES2_LIBRARIES GLESv3)
		set(DEQP_GLES3_LIBRARIES GLESv3)
	else ()
		set(DEQP_GLES2_LIBRARIES GLESv2)
	endif ()

	set(DEQP_EGL_LIBRARIES EGL)
	add_definitions(-DKHRONOS_STATIC_LIB)
endif ()

message(STATUS "DEQP_TARGET_NAME        = ${DEQP_TARGET_NAME}")
message(STATUS "DEQP_SUPPORT_GLES1      = ${DEQP_SUPPORT_GLES1}")
message(STATUS "DEQP_GLES1_LIBRARIES    = ${DEQP_GLES1_LIBRARIES}")
message(STATUS "DEQP_SUPPORT_GLES2      = ${DEQP_SUPPORT_GLES2}")
message(STATUS "DEQP_GLES2_LIBRARIES    = ${DEQP_GLES2_LIBRARIES}")<commit_msg>cmake: Use FindPNG instead of find_path/find_library<commit_after># dEQP cmake file

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)

add_definitions(-DDE_ASSERT_FAILURE_CALLBACK)

# dEQP-specific configuration. Target file should override these.
set(DEQP_TARGET_NAME		"UNKNOWN")		# Target name

set(DEQP_SUPPORT_GLES1		OFF)			# Is GLESv1 supported
set(DEQP_GLES1_LIBRARIES	)				# GLESv1 libraries

set(DEQP_SUPPORT_GLES2		OFF)			# Is GLESv2 supported
set(DEQP_GLES2_LIBRARIES	)				# GLESv2 libraries. If empty, run-time linking is used

set(DEQP_SUPPORT_GLES3		OFF)			# Is GLESv3 supported
set(DEQP_GLES3_LIBRARIES	)				# GLESv3 libraries. If empty, run-time linking is used

set(DEQP_SUPPORT_VG			OFF)			# Is VG supported
set(DEQP_VG_LIBRARIES		)				# VG libraries

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
											# \note OpenGL is always loaded on run-time

set(DEQP_PLATFORM_COPY_LIBRARIES	)		# Libraries / binaries that need to be copied to binary directory

# Delibs include directories
include_directories(
	${DELIBS_DIR}/debase
	${DELIBS_DIR}/decpp
	${DELIBS_DIR}/depool
	${DELIBS_DIR}/dethread
	${DELIBS_DIR}/deutil
	${DELIBS_DIR}/destream
	)

# Include target-specific definitions
include(targets/${DEQP_TARGET}/${DEQP_TARGET}.cmake)

# zlib
find_path(ZLIB_INCLUDE_PATH	zlib.h)
find_library(ZLIB_LIBRARY	z)

if (NOT ZLIB_INCLUDE_PATH OR NOT ZLIB_LIBRARY)
	message(STATUS "System version of zlib not found, using external/zlib")
	add_subdirectory(external/zlib)
	# \note ZLIB_LIBRARY and ZLIB_INCLUDE_PATH are promoted from external/zlib/CMakeLists.txt
endif ()

include_directories(${ZLIB_INCLUDE_PATH})

# libpng
#
# The FindPNG module defines PNG_INCLUDE_DIRS and PNG_LIBRARIES. But dEQP's
# CMake files expect the non-standard PNG_INCLUDE_PATH and PNG_LIBRARY. Set the
# non-standard variables here to retain compatibility with dEQP's existing
# CMake files.
include(FindPNG)
set(PNG_INCLUDE_PATH ${PNG_INCLUDE_DIRS})
set(PNG_LIBRARY ${PNG_LIBRARIES})

if (NOT PNG_INCLUDE_PATH OR NOT PNG_LIBRARY)
	message(STATUS "System version of libpng not found, using external/libpng")
	add_subdirectory(external/libpng)
	# \note PNG_LIBRARY and PNG_INCLUDE_PATH are promoted from external/libpng/CMakeLists.txt
endif ()

include_directories(${PNG_INCLUDE_PATH})

# \todo [2013-04-14 pyry] Remove once we've got dynamic loading of GL libraries figured out
if (DEQP_RUNTIME_LINK)
	include_directories(wrappers/dynlib/inc)

	if (DEQP_SUPPORT_GLES3)
		set(DEQP_GLES2_LIBRARIES GLESv3)
		set(DEQP_GLES3_LIBRARIES GLESv3)
	else ()
		set(DEQP_GLES2_LIBRARIES GLESv2)
	endif ()

	set(DEQP_EGL_LIBRARIES EGL)
	add_definitions(-DKHRONOS_STATIC_LIB)
endif ()

message(STATUS "DEQP_TARGET_NAME        = ${DEQP_TARGET_NAME}")
message(STATUS "DEQP_SUPPORT_GLES1      = ${DEQP_SUPPORT_GLES1}")
message(STATUS "DEQP_GLES1_LIBRARIES    = ${DEQP_GLES1_LIBRARIES}")
message(STATUS "DEQP_SUPPORT_GLES2      = ${DEQP_SUPPORT_GLES2}")
message(STATUS "DEQP_GLES2_LIBRARIES    = ${DEQP_GLES2_LIBRARIES}")
{'fraction_non_alphanumeric': 0.08900218499635834, 'fraction_numerical': 0.010779315367807721, 'mean_word_length': 5.633816425120773, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3044780', 'n_tokens_mistral': 2929, 'n_tokens_neox': 2663, 'n_words': 543}