Add Chromium-only Blender WebEngine parity work
This commit is contained in:
61
blender-5.2.0/extern/opensubdiv-source/cmake/FindCLEW.cmake
vendored
Normal file
61
blender-5.2.0/extern/opensubdiv-source/cmake/FindCLEW.cmake
vendored
Normal file
@@ -0,0 +1,61 @@
|
||||
#
|
||||
# Copyright 2013 Pixar
|
||||
#
|
||||
# Licensed under the terms set forth in the LICENSE.txt file available at
|
||||
# https://opensubdiv.org/license.
|
||||
#
|
||||
|
||||
# Try to find CLEW library and include path.
|
||||
# Once done this will define
|
||||
#
|
||||
# CLEW_FOUND
|
||||
# CLEW_INCLUDE_DIR
|
||||
# CLEW_LIBRARY
|
||||
#
|
||||
|
||||
include (FindPackageHandleStandardArgs)
|
||||
|
||||
if(WIN32)
|
||||
set(_clew_SEARCH_DIRS
|
||||
"${CLEW_LOCATION}/include"
|
||||
"$ENV{CLEW_LOCATION}/include"
|
||||
"$ENV{PROGRAMFILES}/CLEW/include"
|
||||
"${PROJECT_SOURCE_DIR}/extern/clew/include"
|
||||
)
|
||||
else()
|
||||
set(_clew_SEARCH_DIRS
|
||||
"${CLEW_LOCATION}"
|
||||
"$ENV{CLEW_LOCATION}"
|
||||
/usr
|
||||
/usr/local
|
||||
/sw
|
||||
/opt/local
|
||||
/opt/lib/clew
|
||||
)
|
||||
endif()
|
||||
|
||||
find_path(CLEW_INCLUDE_DIR
|
||||
NAMES
|
||||
clew.h
|
||||
HINTS
|
||||
${_clew_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
include
|
||||
NO_DEFAULT_PATH
|
||||
DOC "The directory where clew.h resides")
|
||||
|
||||
find_library(CLEW_LIBRARY
|
||||
NAMES
|
||||
CLEW clew
|
||||
PATHS
|
||||
${_clew_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib lib64
|
||||
NO_DEFAULT_PATH
|
||||
DOC "The CLEW library")
|
||||
|
||||
find_package_handle_standard_args(CLEW
|
||||
REQUIRED_VARS
|
||||
CLEW_INCLUDE_DIR
|
||||
CLEW_LIBRARY
|
||||
)
|
||||
90
blender-5.2.0/extern/opensubdiv-source/cmake/FindDXSDK.cmake
vendored
Normal file
90
blender-5.2.0/extern/opensubdiv-source/cmake/FindDXSDK.cmake
vendored
Normal file
@@ -0,0 +1,90 @@
|
||||
#
|
||||
# Copyright 2013 Pixar
|
||||
#
|
||||
# Licensed under the terms set forth in the LICENSE.txt file available at
|
||||
# https://opensubdiv.org/license.
|
||||
#
|
||||
|
||||
# Try to find DirectX SDK.
|
||||
# Once done this will define
|
||||
#
|
||||
# DXSDK_FOUND
|
||||
# DXSDK_INCLUDE_DIR
|
||||
# DXSDK_LIBRARY_DIR
|
||||
# DXSDK_LIBRARIES
|
||||
# DXSDK_LOCATION
|
||||
#
|
||||
# Also will define
|
||||
|
||||
if (WIN32)
|
||||
find_path(DXSDK_INCLUDE_DIR
|
||||
NAMES
|
||||
D3D11.h D3Dcompiler.h
|
||||
PATHS
|
||||
"${DXSDK_LOCATION}/Include"
|
||||
"$ENV{DXSDK_LOCATION}/Include"
|
||||
"${DXSDK_ROOT}/Include"
|
||||
"$ENV{DXSDK_ROOT}/Include"
|
||||
"C:/Program Files (x86)/Windows Kits/10/Include/${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION}/um"
|
||||
"C:/Program Files (x86)/Windows Kits/8.1/Include/um"
|
||||
"C:/Program Files (x86)/Microsoft DirectX SDK*/Include"
|
||||
"C:/Program Files/Microsoft DirectX SDK*/Include"
|
||||
)
|
||||
|
||||
if ("${CMAKE_GENERATOR}" MATCHES "[Ww]in64" OR
|
||||
"${CMAKE_GENERATOR_PLATFORM}" MATCHES "x64")
|
||||
set(ARCH x64)
|
||||
else()
|
||||
set(ARCH x86)
|
||||
endif()
|
||||
|
||||
find_path(LIBRARY_DIR
|
||||
d3d11.lib
|
||||
PATHS
|
||||
"${DXSDK_LOCATION}/Lib/${ARCH}"
|
||||
"$ENV{DXSDK_LOCATION}/Lib/${ARCH}"
|
||||
"${DXSDK_ROOT}/Lib/${ARCH}"
|
||||
"$ENV{DXSDK_ROOT}/Lib/${ARCH}"
|
||||
"C:/Program Files (x86)/Windows Kits/10/Lib/${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION}/um/${ARCH}"
|
||||
"C:/Program Files (x86)/Windows Kits/8.1/Lib/winv6.3/um/${ARCH}"
|
||||
"C:/Program Files (x86)/Microsoft DirectX SDK*/Lib/${ARCH}"
|
||||
"C:/Program Files/Microsoft DirectX SDK*/Lib/${ARCH}"
|
||||
)
|
||||
|
||||
set(DXSDK_LIBRARY_DIR ${LIBRARY_DIR})
|
||||
|
||||
foreach(DX_LIB d3d11 d3dcompiler)
|
||||
|
||||
find_library(DXSDK_${DX_LIB}_LIBRARY
|
||||
NAMES
|
||||
${DX_LIB}.lib
|
||||
PATHS
|
||||
${DXSDK_LIBRARY_DIR}
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
|
||||
if(NOT DXSDK_${DX_LIB}_LIBRARY)
|
||||
message(FATAL_ERROR "Could not find required library ${DX_LIB}")
|
||||
else()
|
||||
list(APPEND DXSDK_LIBRARIES ${DXSDK_${DX_LIB}_LIBRARY})
|
||||
endif()
|
||||
|
||||
|
||||
endforeach(DX_LIB)
|
||||
|
||||
endif ()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_package_handle_standard_args(DXSDK DEFAULT_MSG
|
||||
DXSDK_INCLUDE_DIR
|
||||
DXSDK_LIBRARY_DIR
|
||||
DXSDK_LIBRARIES
|
||||
)
|
||||
|
||||
mark_as_advanced(
|
||||
DXSDK_INCLUDE_DIR
|
||||
DXSDK_LIBRARY_DIR
|
||||
DXSDK_LIBRARIES
|
||||
)
|
||||
|
||||
75
blender-5.2.0/extern/opensubdiv-source/cmake/FindDocutils.cmake
vendored
Normal file
75
blender-5.2.0/extern/opensubdiv-source/cmake/FindDocutils.cmake
vendored
Normal file
@@ -0,0 +1,75 @@
|
||||
#
|
||||
# Copyright 2013 Pixar
|
||||
#
|
||||
# Licensed under the terms set forth in the LICENSE.txt file available at
|
||||
# https://opensubdiv.org/license.
|
||||
#
|
||||
|
||||
# - Try to find the restructured text to HTML converter
|
||||
#
|
||||
# Once done this will define
|
||||
#
|
||||
# DOCUTILS_FOUND - System has Docutils
|
||||
#
|
||||
# RST2HTML_EXECUTABLE
|
||||
|
||||
find_package(PackageHandleStandardArgs)
|
||||
|
||||
find_program( RST2HTML_EXECUTABLE
|
||||
NAMES
|
||||
rst2html.py
|
||||
rst2html
|
||||
DOC
|
||||
"The Python Docutils reStructuredText to HTML converter"
|
||||
)
|
||||
|
||||
if (RST2HTML_EXECUTABLE)
|
||||
# Note we only check for a python interpreter and use it for the command
|
||||
# on Windows. It would be cleaner if we could agree that this is the
|
||||
# right way to do it for all platforms, or find a way that works for all
|
||||
# platforms uniformly.
|
||||
if (WIN32)
|
||||
find_package(PythonInterp)
|
||||
if (NOT PYTHON_EXECUTABLE)
|
||||
message(FATAL_ERROR "Could not find Python interpreter, which is required for Docutils")
|
||||
endif()
|
||||
execute_process(COMMAND ${PYTHON_EXECUTABLE} ${RST2HTML_EXECUTABLE} --version OUTPUT_VARIABLE VERSION_STRING )
|
||||
else()
|
||||
execute_process(COMMAND ${RST2HTML_EXECUTABLE} --version OUTPUT_VARIABLE VERSION_STRING )
|
||||
endif()
|
||||
|
||||
# The above code may fail to find a version. Which will make the REGEX
|
||||
# REPLACE below fail and break the build. So we check for an empty
|
||||
# VERSION_STRING.
|
||||
if (NOT "${VERSION_STRING}" STREQUAL "")
|
||||
|
||||
# find the version
|
||||
# ex : rst2html (Docutils 0.6 [release], Python 2.6.6, on linux2)
|
||||
string(REGEX MATCHALL "([^\ ]+\ |[^\ ]+$)" VERSION_TOKENS "${VERSION_STRING}")
|
||||
|
||||
# isolate the 3rd. word in the string
|
||||
list (GET VERSION_TOKENS 2 VERSION_STRING)
|
||||
|
||||
# remove white space
|
||||
string(REGEX REPLACE "[ \t]+$" "" VERSION_STRING ${VERSION_STRING})
|
||||
string(REGEX REPLACE "^[ \t]+" "" VERSION_STRING ${VERSION_STRING})
|
||||
|
||||
set(DOCUTILS_VERSION ${VERSION_STRING})
|
||||
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_package_handle_standard_args(Docutils
|
||||
REQUIRED_VARS
|
||||
RST2HTML_EXECUTABLE
|
||||
DOCUTILS_VERSION
|
||||
VERSION_VAR
|
||||
DOCUTILS_VERSION
|
||||
)
|
||||
|
||||
mark_as_advanced(
|
||||
RST2HTML_EXECUTABLE
|
||||
)
|
||||
90
blender-5.2.0/extern/opensubdiv-source/cmake/FindGLEW.cmake
vendored
Normal file
90
blender-5.2.0/extern/opensubdiv-source/cmake/FindGLEW.cmake
vendored
Normal file
@@ -0,0 +1,90 @@
|
||||
#
|
||||
# Copyright 2013 Pixar
|
||||
#
|
||||
# Licensed under the terms set forth in the LICENSE.txt file available at
|
||||
# https://opensubdiv.org/license.
|
||||
#
|
||||
|
||||
# Try to find GLEW library and include path.
|
||||
# Once done this will define
|
||||
#
|
||||
# GLEW_FOUND
|
||||
# GLEW_INCLUDE_DIR
|
||||
# GLEW_LIBRARY
|
||||
#
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
if (WIN32)
|
||||
|
||||
find_path(GLEW_INCLUDE_DIR
|
||||
NAMES
|
||||
GL/glew.h
|
||||
HINTS
|
||||
"${GLEW_LOCATION}/include"
|
||||
"$ENV{GLEW_LOCATION}/include"
|
||||
PATHS
|
||||
"$ENV{PROGRAMFILES}/GLEW/include"
|
||||
"${PROJECT_SOURCE_DIR}/extern/glew/include"
|
||||
DOC "The directory where GL/glew.h resides" )
|
||||
|
||||
if ("${CMAKE_GENERATOR}" MATCHES "[Ww]in64" OR
|
||||
"${CMAKE_GENERATOR_PLATFORM}" MATCHES "x64")
|
||||
set(ARCH x64)
|
||||
else()
|
||||
set(ARCH x86)
|
||||
endif()
|
||||
|
||||
find_library(GLEW_LIBRARY
|
||||
NAMES
|
||||
glew GLEW glew32s glew32
|
||||
HINTS
|
||||
"${GLEW_LOCATION}/lib"
|
||||
"$ENV{GLEW_LOCATION}/lib"
|
||||
PATHS
|
||||
"$ENV{PROGRAMFILES}/GLEW/lib"
|
||||
"${PROJECT_SOURCE_DIR}/extern/glew/bin"
|
||||
"${PROJECT_SOURCE_DIR}/extern/glew/lib"
|
||||
PATH_SUFFIXES
|
||||
Release/${ARCH}
|
||||
DOC "The GLEW library")
|
||||
endif ()
|
||||
|
||||
if (${CMAKE_HOST_UNIX})
|
||||
find_path( GLEW_INCLUDE_DIR
|
||||
NAMES
|
||||
GL/glew.h
|
||||
HINTS
|
||||
"${GLEW_LOCATION}/include"
|
||||
"$ENV{GLEW_LOCATION}/include"
|
||||
PATHS
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
/sw/include
|
||||
/opt/local/include
|
||||
NO_DEFAULT_PATH
|
||||
DOC "The directory where GL/glew.h resides"
|
||||
)
|
||||
find_library( GLEW_LIBRARY
|
||||
NAMES
|
||||
GLEW glew
|
||||
HINTS
|
||||
"${GLEW_LOCATION}/lib"
|
||||
"$ENV{GLEW_LOCATION}/lib"
|
||||
PATHS
|
||||
/usr/lib64
|
||||
/usr/lib
|
||||
/usr/lib/${CMAKE_LIBRARY_ARCHITECTURE}
|
||||
/usr/local/lib64
|
||||
/usr/local/lib
|
||||
/sw/lib
|
||||
/opt/local/lib
|
||||
NO_DEFAULT_PATH
|
||||
DOC "The GLEW library")
|
||||
endif ()
|
||||
|
||||
find_package_handle_standard_args(GLEW
|
||||
REQUIRED_VARS
|
||||
GLEW_INCLUDE_DIR
|
||||
GLEW_LIBRARY
|
||||
)
|
||||
256
blender-5.2.0/extern/opensubdiv-source/cmake/FindGLFW.cmake
vendored
Normal file
256
blender-5.2.0/extern/opensubdiv-source/cmake/FindGLFW.cmake
vendored
Normal file
@@ -0,0 +1,256 @@
|
||||
#
|
||||
# Copyright 2013 Pixar
|
||||
#
|
||||
# Licensed under the terms set forth in the LICENSE.txt file available at
|
||||
# https://opensubdiv.org/license.
|
||||
#
|
||||
|
||||
# Try to find GLFW library and include path.
|
||||
# Once done this will define
|
||||
#
|
||||
# GLFW_FOUND
|
||||
# GLFW_INCLUDE_DIR
|
||||
# GLFW_LIBRARIES
|
||||
#
|
||||
|
||||
if(NOT NO_GLFW_X11)
|
||||
set(GLFW_X11_INCLUDE_DIRS
|
||||
"/usr/X11R6/include"
|
||||
"/usr/include/X11"
|
||||
)
|
||||
set(GLFW_X11_LIB_DIRS
|
||||
"/usr/X11R6/lib"
|
||||
)
|
||||
else()
|
||||
set(GLFW_X11_INCLUDE_DIRS "")
|
||||
set(GLFW_X11_LIB_DIRS "")
|
||||
endif()
|
||||
|
||||
find_path( GLFW_INCLUDE_DIR
|
||||
NAMES
|
||||
GLFW/glfw3.h
|
||||
HINTS
|
||||
"${GLFW_LOCATION}/include"
|
||||
"$ENV{GLFW_LOCATION}/include"
|
||||
PATHS
|
||||
"$ENV{PROGRAMFILES}/GLFW/include"
|
||||
"${OPENGL_INCLUDE_DIR}"
|
||||
/usr/openwin/share/include
|
||||
/usr/openwin/include
|
||||
"${GLFW_X11_INCLUDE_DIRS}"
|
||||
/opt/graphics/OpenGL/include
|
||||
/opt/graphics/OpenGL/contrib/libglfw
|
||||
/usr/local/include
|
||||
/usr/include/GL
|
||||
/usr/include
|
||||
DOC
|
||||
"The directory where GLFW/glfw3.h resides"
|
||||
)
|
||||
|
||||
#
|
||||
# XXX: Do we still need to search for GL/glfw.h?
|
||||
#
|
||||
find_path( GLFW_INCLUDE_DIR
|
||||
NAMES
|
||||
GL/glfw.h
|
||||
HINTS
|
||||
"${GLFW_LOCATION}/include"
|
||||
"$ENV{GLFW_LOCATION}/include"
|
||||
PATHS
|
||||
"$ENV{PROGRAMFILES}/GLFW/include"
|
||||
"${OPENGL_INCLUDE_DIR}"
|
||||
/usr/openwin/share/include
|
||||
/usr/openwin/include
|
||||
"${GLFW_X11_INCLUDE_DIRS}"
|
||||
/opt/graphics/OpenGL/include
|
||||
/opt/graphics/OpenGL/contrib/libglfw
|
||||
/usr/local/include
|
||||
/usr/include/GL
|
||||
/usr/include
|
||||
DOC
|
||||
"The directory where GL/glfw.h resides"
|
||||
)
|
||||
|
||||
if (WIN32)
|
||||
if(CYGWIN)
|
||||
find_library( GLFW_glfw_LIBRARY
|
||||
NAMES
|
||||
glfw32
|
||||
HINTS
|
||||
"${GLFW_LOCATION}/lib"
|
||||
"${GLFW_LOCATION}/lib/x64"
|
||||
"$ENV{GLFW_LOCATION}/lib"
|
||||
PATHS
|
||||
"${OPENGL_LIBRARY_DIR}"
|
||||
/usr/lib
|
||||
/usr/lib/w32api
|
||||
/usr/local/lib
|
||||
"${GLFW_X11_LIB_DIRS}"
|
||||
DOC
|
||||
"The GLFW library"
|
||||
)
|
||||
else()
|
||||
find_library( GLFW_glfw_LIBRARY
|
||||
NAMES
|
||||
glfw32
|
||||
glfw32s
|
||||
glfw
|
||||
glfw3
|
||||
HINTS
|
||||
"${GLFW_LOCATION}/lib"
|
||||
"${GLFW_LOCATION}/lib/x64"
|
||||
"${GLFW_LOCATION}/lib-msvc110"
|
||||
"${GLFW_LOCATION}/lib-vc2012"
|
||||
"$ENV{GLFW_LOCATION}/lib"
|
||||
"$ENV{GLFW_LOCATION}/lib/x64"
|
||||
"$ENV{GLFW_LOCATION}/lib-msvc110"
|
||||
"$ENV{GLFW_LOCATION}/lib-vc2012"
|
||||
PATHS
|
||||
"$ENV{PROGRAMFILES}/GLFW/lib"
|
||||
"${OPENGL_LIBRARY_DIR}"
|
||||
DOC
|
||||
"The GLFW library"
|
||||
)
|
||||
endif()
|
||||
else ()
|
||||
if (APPLE)
|
||||
find_library( GLFW_glfw_LIBRARY glfw
|
||||
NAMES
|
||||
glfw
|
||||
glfw3
|
||||
HINTS
|
||||
"${GLFW_LOCATION}/lib"
|
||||
"${GLFW_LOCATION}/lib/cocoa"
|
||||
"$ENV{GLFW_LOCATION}/lib"
|
||||
"$ENV{GLFW_LOCATION}/lib/cocoa"
|
||||
PATHS
|
||||
/usr/local/lib
|
||||
)
|
||||
set(GLFW_cocoa_LIBRARY "-framework Cocoa" CACHE STRING "Cocoa framework for OSX")
|
||||
set(GLFW_corevideo_LIBRARY "-framework CoreVideo" CACHE STRING "CoreVideo framework for OSX")
|
||||
set(GLFW_iokit_LIBRARY "-framework IOKit" CACHE STRING "IOKit framework for OSX")
|
||||
else ()
|
||||
# (*)NIX
|
||||
|
||||
find_package(Threads REQUIRED)
|
||||
|
||||
if(NOT NO_GLFW_X11)
|
||||
find_package(X11 REQUIRED)
|
||||
|
||||
if(NOT X11_Xrandr_FOUND)
|
||||
message(FATAL_ERROR "Xrandr library not found - required for GLFW")
|
||||
endif()
|
||||
|
||||
if(NOT X11_xf86vmode_FOUND)
|
||||
message(FATAL_ERROR "xf86vmode library not found - required for GLFW")
|
||||
endif()
|
||||
|
||||
if(NOT X11_Xcursor_FOUND)
|
||||
message(FATAL_ERROR "Xcursor library not found - required for GLFW")
|
||||
endif()
|
||||
|
||||
if(NOT X11_Xinerama_FOUND)
|
||||
message(FATAL_ERROR "Xinerama library not found - required for GLFW")
|
||||
endif()
|
||||
|
||||
if(NOT X11_Xi_FOUND)
|
||||
message(FATAL_ERROR "Xi library not found - required for GLFW")
|
||||
endif()
|
||||
|
||||
list(APPEND GLFW_x11_LIBRARY "${X11_Xrandr_LIB}" "${X11_Xxf86vm_LIB}" "${X11_Xcursor_LIB}" "${X11_Xinerama_LIB}" "${X11_Xi_LIB}" "${X11_LIBRARIES}" "${CMAKE_THREAD_LIBS_INIT}" -lrt -ldl)
|
||||
endif (NOT NO_GLFW_X11)
|
||||
|
||||
find_library( GLFW_glfw_LIBRARY
|
||||
NAMES
|
||||
glfw
|
||||
glfw3
|
||||
HINTS
|
||||
"${GLFW_LOCATION}/lib"
|
||||
"$ENV{GLFW_LOCATION}/lib"
|
||||
"${GLFW_LOCATION}/lib/x11"
|
||||
"$ENV{GLFW_LOCATION}/lib/x11"
|
||||
PATHS
|
||||
/usr/lib64
|
||||
/usr/lib
|
||||
/usr/lib/${CMAKE_LIBRARY_ARCHITECTURE}
|
||||
/usr/local/lib64
|
||||
/usr/local/lib
|
||||
/usr/local/lib/${CMAKE_LIBRARY_ARCHITECTURE}
|
||||
/usr/openwin/lib
|
||||
"${GLFW_X11_LIB_DIRS}"
|
||||
DOC
|
||||
"The GLFW library"
|
||||
)
|
||||
endif (APPLE)
|
||||
endif (WIN32)
|
||||
|
||||
set( GLFW_FOUND "NO" )
|
||||
|
||||
if(GLFW_INCLUDE_DIR)
|
||||
|
||||
if(GLFW_glfw_LIBRARY)
|
||||
set( GLFW_LIBRARIES "${GLFW_glfw_LIBRARY}"
|
||||
"${GLFW_x11_LIBRARY}"
|
||||
"${GLFW_cocoa_LIBRARY}"
|
||||
"${GLFW_iokit_LIBRARY}"
|
||||
"${GLFW_corevideo_LIBRARY}" )
|
||||
set( GLFW_FOUND "YES" )
|
||||
set (GLFW_LIBRARY "${GLFW_LIBRARIES}")
|
||||
set (GLFW_INCLUDE_PATH "${GLFW_INCLUDE_DIR}")
|
||||
endif(GLFW_glfw_LIBRARY)
|
||||
|
||||
|
||||
# Tease the GLFW_VERSION numbers from the lib headers
|
||||
function(parseVersion FILENAME VARNAME)
|
||||
|
||||
set(PATTERN "^#define ${VARNAME}.*$")
|
||||
|
||||
file(STRINGS "${GLFW_INCLUDE_DIR}/${FILENAME}" TMP REGEX ${PATTERN})
|
||||
|
||||
string(REGEX MATCHALL "[0-9]+" TMP ${TMP})
|
||||
|
||||
set(${VARNAME} ${TMP} PARENT_SCOPE)
|
||||
|
||||
endfunction()
|
||||
|
||||
|
||||
if(EXISTS "${GLFW_INCLUDE_DIR}/GL/glfw.h")
|
||||
|
||||
parseVersion(GL/glfw.h GLFW_VERSION_MAJOR)
|
||||
parseVersion(GL/glfw.h GLFW_VERSION_MINOR)
|
||||
parseVersion(GL/glfw.h GLFW_VERSION_REVISION)
|
||||
|
||||
elseif(EXISTS "${GLFW_INCLUDE_DIR}/GLFW/glfw3.h")
|
||||
|
||||
parseVersion(GLFW/glfw3.h GLFW_VERSION_MAJOR)
|
||||
parseVersion(GLFW/glfw3.h GLFW_VERSION_MINOR)
|
||||
parseVersion(GLFW/glfw3.h GLFW_VERSION_REVISION)
|
||||
|
||||
endif()
|
||||
|
||||
if(${GLFW_VERSION_MAJOR} OR ${GLFW_VERSION_MINOR} OR ${GLFW_VERSION_REVISION})
|
||||
set(GLFW_VERSION "${GLFW_VERSION_MAJOR}.${GLFW_VERSION_MINOR}.${GLFW_VERSION_REVISION}")
|
||||
set(GLFW_VERSION_STRING "${GLFW_VERSION}")
|
||||
mark_as_advanced(GLFW_VERSION)
|
||||
endif()
|
||||
|
||||
endif(GLFW_INCLUDE_DIR)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_package_handle_standard_args(GLFW
|
||||
REQUIRED_VARS
|
||||
GLFW_INCLUDE_DIR
|
||||
GLFW_LIBRARIES
|
||||
VERSION_VAR
|
||||
GLFW_VERSION
|
||||
)
|
||||
|
||||
mark_as_advanced(
|
||||
GLFW_INCLUDE_DIR
|
||||
GLFW_LIBRARIES
|
||||
GLFW_glfw_LIBRARY
|
||||
GLFW_cocoa_LIBRARY
|
||||
)
|
||||
|
||||
|
||||
22
blender-5.2.0/extern/opensubdiv-source/cmake/FindMetal.cmake
vendored
Normal file
22
blender-5.2.0/extern/opensubdiv-source/cmake/FindMetal.cmake
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
if(APPLE)
|
||||
find_path( METAL_INCLUDE_DIR
|
||||
Metal/Metal.h
|
||||
)
|
||||
|
||||
find_library( METAL_FRAMEWORKS Metal )
|
||||
|
||||
if(METAL_FRAMEWORKS)
|
||||
set( METAL_LIBRARIES "-framework Metal -framework Foundation" )
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
set( METAL_FOUND "NO" )
|
||||
if(METAL_LIBRARIES)
|
||||
set( METAL_FOUND "YES" )
|
||||
endif(METAL_LIBRARIES)
|
||||
|
||||
mark_as_advanced(
|
||||
METAL_INCLUDE_DIR
|
||||
METAL_LIBRARIES
|
||||
)
|
||||
195
blender-5.2.0/extern/opensubdiv-source/cmake/FindOpenCL.cmake
vendored
Normal file
195
blender-5.2.0/extern/opensubdiv-source/cmake/FindOpenCL.cmake
vendored
Normal file
@@ -0,0 +1,195 @@
|
||||
#
|
||||
# Copyright 2013 Pixar
|
||||
#
|
||||
# Licensed under the terms set forth in the LICENSE.txt file available at
|
||||
# https://opensubdiv.org/license.
|
||||
#
|
||||
|
||||
# - Try to find an OpenCL library
|
||||
# Once done this will define
|
||||
#
|
||||
# OPENCL_FOUND - System has OPENCL
|
||||
# OPENCL_INCLUDE_DIRS - The OPENCL include directory
|
||||
# OPENCL_LIBRARIES - The libraries needed to use OPENCL
|
||||
|
||||
|
||||
find_package(PackageHandleStandardArgs)
|
||||
|
||||
if (APPLE)
|
||||
|
||||
find_library( OPENCL_LIBRARIES
|
||||
NAMES
|
||||
OpenCL
|
||||
DOC "OpenCL lib for OSX"
|
||||
)
|
||||
|
||||
find_path( OPENCL_INCLUDE_DIRS
|
||||
NAMES
|
||||
OpenCL/cl.h
|
||||
DOC "Include for OpenCL on OSX"
|
||||
)
|
||||
|
||||
find_path( _OPENCL_CPP_INCLUDE_DIRS
|
||||
NAMES
|
||||
OpenCL/cl.hpp
|
||||
DOC "Include for OpenCL CPP bindings on OSX"
|
||||
)
|
||||
|
||||
elseif (WIN32)
|
||||
|
||||
find_path( OPENCL_INCLUDE_DIRS
|
||||
NAMES
|
||||
CL/cl.h
|
||||
)
|
||||
|
||||
find_path( _OPENCL_CPP_INCLUDE_DIRS
|
||||
NAMES
|
||||
CL/cl.hpp
|
||||
)
|
||||
|
||||
find_library( OPENCL_LIBRARIES
|
||||
NAMES
|
||||
OpenCL.lib
|
||||
PATHS
|
||||
ENV OpenCL_LIBPATH
|
||||
"$ENV{ATISTREAMSDKROOT}/lib/x86_64"
|
||||
"$ENV{ATISTREAMSDKROOT}/lib/x86"
|
||||
"C:/Program Files (x86)/Intel/OpenCL SDK/2.0/lib/x64"
|
||||
"C:/Program Files (x86)/Intel/OpenCL SDK/2.0/lib/x86"
|
||||
)
|
||||
|
||||
get_filename_component( _OPENCL_INC_CAND ${OPENCL_LIB_DIR}/../../include ABSOLUTE )
|
||||
|
||||
find_path( OPENCL_INCLUDE_DIRS
|
||||
NAMES
|
||||
CL/cl.h
|
||||
PATHS
|
||||
"${_OPENCL_INC_CAND}"
|
||||
ENV OpenCL_INCPATH
|
||||
)
|
||||
|
||||
find_path( _OPENCL_CPP_INCLUDE_DIRS
|
||||
NAMES
|
||||
CL/cl.hpp
|
||||
PATHS
|
||||
"${_OPENCL_INC_CAND}"
|
||||
ENV OpenCL_INCPATH
|
||||
)
|
||||
|
||||
# AMD APP SDK
|
||||
find_file(_OPENCL_DX_INTEROP_CL_D3D11_H
|
||||
NAMES
|
||||
CL/cl_d3d11.h
|
||||
PATHS
|
||||
"${_OPENCL_INC_CAND}"
|
||||
"${OPENCL_INCLUDE_DIRS}"
|
||||
ENV OpenCL_INCPATH
|
||||
)
|
||||
if (_OPENCL_DX_INTEROP_CL_D3D11_H)
|
||||
set(OPENCL_CL_D3D11_H_FOUND "YES")
|
||||
message("OpenCL DX11 interop found ${_OPENCL_DX_INTEROP_CL_D3D11_H}")
|
||||
endif()
|
||||
|
||||
# NVIDIA GPU Computing ToolKit
|
||||
find_file(_OPENCL_DX_INTEROP_CL_D3D11_EXT_H
|
||||
NAMES
|
||||
CL/cl_d3d11_ext.h
|
||||
PATHS
|
||||
"${_OPENCL_INC_CAND}"
|
||||
"${OPENCL_INCLUDE_DIRS}"
|
||||
ENV OpenCL_INCPATH
|
||||
)
|
||||
|
||||
if (_OPENCL_DX_INTEROP_CL_D3D11_EXT_H)
|
||||
set(OPENCL_CL_D3D11_EXT_H_FOUND "YES")
|
||||
message("OpenCL DX11 interop found ${_OPENCL_DX_INTEROP_CL_D3D11_EXT_H}")
|
||||
endif()
|
||||
|
||||
if (NOT _OPENCL_DX_INTEROP_CL_D3D11_H AND NOT _OPENCL_DX_INTEROP_CL_D3D11_EXT_H)
|
||||
message("OpenCL DX11 interop not found")
|
||||
endif()
|
||||
|
||||
elseif (UNIX)
|
||||
|
||||
find_library( OPENCL_LIBRARIES
|
||||
NAMES
|
||||
OpenCL
|
||||
PATHS
|
||||
ENV LD_LIBRARY_PATH
|
||||
ENV OpenCL_LIBPATH
|
||||
)
|
||||
|
||||
get_filename_component( OPENCL_LIB_DIR ${OPENCL_LIBRARIES} PATH )
|
||||
|
||||
get_filename_component( _OPENCL_INC_CAND "${OPENCL_LIB_DIR}/../../include" ABSOLUTE )
|
||||
|
||||
find_path( OPENCL_INCLUDE_DIRS
|
||||
NAMES
|
||||
CL/cl.h
|
||||
PATHS
|
||||
"${_OPENCL_INC_CAND}"
|
||||
"/usr/local/cuda/include"
|
||||
"/opt/AMDAPP/include"
|
||||
ENV OpenCL_INCPATH
|
||||
)
|
||||
|
||||
find_path( _OPENCL_CPP_INCLUDE_DIRS
|
||||
NAMES
|
||||
CL/cl.hpp
|
||||
PATHS
|
||||
"${_OPENCL_INC_CAND}"
|
||||
"/usr/local/cuda/include"
|
||||
"/opt/AMDAPP/include"
|
||||
ENV OpenCL_INCPATH
|
||||
)
|
||||
|
||||
else ()
|
||||
|
||||
message( "Could not determine OpenCL platform" )
|
||||
|
||||
endif ()
|
||||
|
||||
|
||||
if(_OPENCL_CPP_INCLUDE_DIRS)
|
||||
|
||||
set( OPENCL_HAS_CPP_BINDINGS TRUE )
|
||||
|
||||
list( APPEND OPENCL_INCLUDE_DIRS ${_OPENCL_CPP_INCLUDE_DIRS} )
|
||||
|
||||
list( REMOVE_DUPLICATES OPENCL_INCLUDE_DIRS )
|
||||
|
||||
if(EXISTS "${OPENCL_INCLUDE_DIRS}/CL/cl.h")
|
||||
|
||||
file(STRINGS "${OPENCL_INCLUDE_DIRS}/CL/cl.h" LINES REGEX "^#define CL_VERSION_[0-9]_[0-9]")
|
||||
|
||||
foreach(LINE ${LINES})
|
||||
|
||||
string(REGEX MATCHALL "[0-9]+" VERSION ${LINE})
|
||||
|
||||
#string(SUBSTRING ${VERSION} 1 2 FOO)
|
||||
|
||||
list(GET VERSION 0 MAJOR)
|
||||
list(GET VERSION 1 MINOR)
|
||||
set(VERSION ${MAJOR}.${MINOR})
|
||||
|
||||
if (NOT OPENCL_VERSION OR OPENCL_VERSION VERSION_LESS ${VERSION})
|
||||
set(OPENCL_VERSION ${VERSION})
|
||||
endif()
|
||||
|
||||
endforeach()
|
||||
|
||||
endif()
|
||||
|
||||
endif(_OPENCL_CPP_INCLUDE_DIRS)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_package_handle_standard_args(OpenCL
|
||||
REQUIRED_VARS
|
||||
OPENCL_LIBRARIES
|
||||
OPENCL_INCLUDE_DIRS
|
||||
VERSION_VAR
|
||||
OPENCL_VERSION
|
||||
)
|
||||
|
||||
mark_as_advanced( OPENCL_INCLUDE_DIRS )
|
||||
50
blender-5.2.0/extern/opensubdiv-source/cmake/FindOpenGLES.cmake
vendored
Normal file
50
blender-5.2.0/extern/opensubdiv-source/cmake/FindOpenGLES.cmake
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
#
|
||||
# Copyright 2013 Pixar
|
||||
#
|
||||
# Licensed under the terms set forth in the LICENSE.txt file available at
|
||||
# https://opensubdiv.org/license.
|
||||
#
|
||||
|
||||
# - Try to find OpenGLES
|
||||
# Once done this will define
|
||||
#
|
||||
# OPENGLES_FOUND - system has OpenGLES
|
||||
# OPENGLES_INCLUDE_DIR - the GL include directory
|
||||
# OPENGLES_LIBRARIES - Link these to use OpenGLES
|
||||
|
||||
if(ANDROID)
|
||||
FIND_PATH( OPENGLES_INCLUDE_DIR
|
||||
GLES2/gl2.h
|
||||
"${ANDROID_STANDALONE_TOOLCHAIN}/usr/include"
|
||||
)
|
||||
|
||||
FIND_LIBRARY( OPENGLES_LIBRARIES
|
||||
NAMES
|
||||
GLESv2
|
||||
PATHS
|
||||
"${ANDROID_STANDALONE_TOOLCHAIN}/usr/lib"
|
||||
)
|
||||
|
||||
elseif(IOS)
|
||||
FIND_PATH( OPENGLES_INCLUDE_DIR
|
||||
OpenGLES/ES2/gl.h
|
||||
)
|
||||
|
||||
FIND_LIBRARY( OPENGLES_FRAMEWORKS OpenGLES )
|
||||
|
||||
if(OPENGLES_FRAMEWORKS)
|
||||
set( OPENGLES_LIBRARIES "-framework OpenGLES" )
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
||||
SET( OPENGLES_FOUND "NO" )
|
||||
IF(OPENGLES_LIBRARIES)
|
||||
SET( OPENGLES_FOUND "YES" )
|
||||
ENDIF(OPENGLES_LIBRARIES)
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
OPENGLES_INCLUDE_DIR
|
||||
OPENGLES_LIBRARIES
|
||||
)
|
||||
|
||||
133
blender-5.2.0/extern/opensubdiv-source/cmake/FindPTex.cmake
vendored
Normal file
133
blender-5.2.0/extern/opensubdiv-source/cmake/FindPTex.cmake
vendored
Normal file
@@ -0,0 +1,133 @@
|
||||
#
|
||||
# Copyright 2013 Pixar
|
||||
#
|
||||
# Licensed under the terms set forth in the LICENSE.txt file available at
|
||||
# https://opensubdiv.org/license.
|
||||
#
|
||||
|
||||
# Try to find PTex library and include path.
|
||||
# Once done this will define
|
||||
#
|
||||
# PTEX_FOUND
|
||||
# PTEX_INCLUDE_DIR
|
||||
# PTEX_LIBRARY
|
||||
#
|
||||
|
||||
if (WIN32)
|
||||
find_path( PTEX_INCLUDE_DIR
|
||||
NAMES
|
||||
Ptexture.h
|
||||
HINTS
|
||||
"${PTEX_LOCATION}/include"
|
||||
"$ENV{PTEX_LOCATION}/include"
|
||||
PATHS
|
||||
"$ENV{PROGRAMFILES}/Ptex/include"
|
||||
/usr/include
|
||||
DOC "The directory where Ptexture.h resides")
|
||||
find_library( PTEX_LIBRARY
|
||||
NAMES
|
||||
Ptex32 Ptex32s Ptex
|
||||
HINTS
|
||||
"${PTEX_LOCATION}/lib"
|
||||
"$ENV{PTEX_LOCATION}/lib"
|
||||
PATHS
|
||||
"$ENV{PROGRAMFILES}/Ptex/lib"
|
||||
/usr/lib
|
||||
/usr/lib/w32api
|
||||
/usr/local/lib
|
||||
/usr/X11R6/lib
|
||||
DOC "The Ptex library")
|
||||
elseif (APPLE)
|
||||
find_path( PTEX_INCLUDE_DIR
|
||||
NAMES
|
||||
Ptexture.h
|
||||
HINTS
|
||||
"${PTEX_LOCATION}/include"
|
||||
"$ENV{PTEX_LOCATION}/include"
|
||||
PATHS
|
||||
DOC "The directory where Ptexture.h resides")
|
||||
if (IOS)
|
||||
#IOS needs to link with the static version of ptex
|
||||
find_library( PTEX_LIBRARY
|
||||
NAMES
|
||||
libPtex.a
|
||||
PATHS
|
||||
"${PTEX_LOCATION}/lib"
|
||||
"$ENV{PTEX_LOCATION}/lib"
|
||||
DOC "The Ptex Library")
|
||||
else ()
|
||||
find_library( PTEX_LIBRARY
|
||||
NAMES
|
||||
Ptex libPtex.a
|
||||
PATHS
|
||||
"${PTEX_LOCATION}/lib"
|
||||
"$ENV{PTEX_LOCATION}/lib"
|
||||
DOC "The Ptex Library")
|
||||
endif()
|
||||
else ()
|
||||
find_path( PTEX_INCLUDE_DIR
|
||||
NAMES
|
||||
Ptexture.h
|
||||
HINTS
|
||||
"${PTEX_LOCATION}/include"
|
||||
"${PTEX_LOCATION}/include/wdas"
|
||||
"$ENV{PTEX_LOCATION}/include"
|
||||
"$ENV{PTEX_LOCATION}/include/wdas"
|
||||
PATHS
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
/usr/openwin/share/include
|
||||
/usr/openwin/include
|
||||
/usr/X11R6/include
|
||||
/usr/include/X11
|
||||
DOC "The directory where Ptexture.h resides")
|
||||
find_library( PTEX_LIBRARY
|
||||
NAMES
|
||||
Ptex wdasPtex
|
||||
HINTS
|
||||
"${PTEX_LOCATION}/lib"
|
||||
"$ENV{PTEX_LOCATION}/lib"
|
||||
PATHS
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
/usr/openwin/lib
|
||||
/usr/X11R6/lib
|
||||
DOC "The Ptex library")
|
||||
endif ()
|
||||
|
||||
if (PTEX_INCLUDE_DIR AND EXISTS "${PTEX_INCLUDE_DIR}/PtexVersion.h")
|
||||
set (PTEX_VERSION_FILE "${PTEX_INCLUDE_DIR}/PtexVersion.h")
|
||||
elseif (PTEX_INCLUDE_DIR AND EXISTS "${PTEX_INCLUDE_DIR}/Ptexture.h")
|
||||
set (PTEX_VERSION_FILE "${PTEX_INCLUDE_DIR}/Ptexture.h")
|
||||
endif()
|
||||
|
||||
if (PTEX_VERSION_FILE)
|
||||
|
||||
file(STRINGS "${PTEX_VERSION_FILE}" TMP REGEX "^#define PtexAPIVersion.*$")
|
||||
string(REGEX MATCHALL "[0-9]+" API ${TMP})
|
||||
|
||||
file(STRINGS "${PTEX_VERSION_FILE}" TMP REGEX "^#define PtexFileMajorVersion.*$")
|
||||
string(REGEX MATCHALL "[0-9]+" MAJOR ${TMP})
|
||||
|
||||
file(STRINGS "${PTEX_VERSION_FILE}" TMP REGEX "^#define PtexFileMinorVersion.*$")
|
||||
string(REGEX MATCHALL "[0-9]+" MINOR ${TMP})
|
||||
|
||||
set(PTEX_VERSION ${API}.${MAJOR}.${MINOR})
|
||||
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_package_handle_standard_args(PTex
|
||||
REQUIRED_VARS
|
||||
PTEX_INCLUDE_DIR
|
||||
PTEX_LIBRARY
|
||||
VERSION_VAR
|
||||
PTEX_VERSION
|
||||
)
|
||||
|
||||
mark_as_advanced(
|
||||
PTEX_INCLUDE_DIR
|
||||
PTEX_LIBRARY
|
||||
)
|
||||
|
||||
50
blender-5.2.0/extern/opensubdiv-source/cmake/iOSToolchain.cmake
vendored
Normal file
50
blender-5.2.0/extern/opensubdiv-source/cmake/iOSToolchain.cmake
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
|
||||
|
||||
|
||||
set(SDKROOT $ENV{SDKROOT})
|
||||
set(RC_ARCHS $ENV{RC_ARCHS})
|
||||
separate_arguments(RC_ARCHS)
|
||||
set(ARCH_FLAGS "-arch arm64")
|
||||
foreach(ARCH ${RC_ARCHS})
|
||||
set(ARCH_FLAGS "${ARCH_FLAGS} -arch ${ARCH}")
|
||||
endforeach(ARCH)
|
||||
|
||||
execute_process(COMMAND xcodebuild -version -sdk ${SDKROOT} PlatformPath OUTPUT_VARIABLE DEVROOT OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
execute_process(COMMAND xcodebuild -version -sdk ${SDKROOT} ProductVersion OUTPUT_VARIABLE SDKVER OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
execute_process(COMMAND xcodebuild -version -sdk ${SDKROOT} Path OUTPUT_VARIABLE SDKROOT OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
execute_process(COMMAND xcrun -sdk ${SDKROOT} -f cc OUTPUT_VARIABLE CC OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
execute_process(COMMAND xcrun -sdk ${SDKROOT} -f c++ OUTPUT_VARIABLE CXX OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
set(CMAKE_SYSTEM_NAME Darwin)
|
||||
set(CMAKE_SYSTEM_VERSION 9)
|
||||
set(CMAKE_SYSTEM_PROCESSOR arm)
|
||||
|
||||
set (iPhone 1)
|
||||
set (iPhoneOS 1)
|
||||
set (iPhoneOS_VERSION ${SDKVER})
|
||||
set (IOS 1)
|
||||
|
||||
set(CMAKE_FIND_ROOT_PATH "${SDKROOT}" "${DEVROOT}")
|
||||
set(CMAKE_OSX_SYSROOT "${SDKROOT}")
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM BOTH)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||
|
||||
set(CMAKE_MACOSX_BUNDLE YES)
|
||||
set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED "NO")
|
||||
|
||||
string(FIND ${DEVROOT} ".platform" PLATFORM_END REVERSE)
|
||||
string(FIND ${DEVROOT} "/" PLATFORM_START REVERSE)
|
||||
math(EXPR PLATFORM_START "${PLATFORM_START} + 1")
|
||||
math(EXPR PLATFORM_LENGTH "${PLATFORM_END} - ${PLATFORM_START}")
|
||||
string(SUBSTRING ${DEVROOT} ${PLATFORM_START} ${PLATFORM_LENGTH} PLATFORM)
|
||||
string(TOLOWER ${PLATFORM} PLATFORM)
|
||||
set(VERSIONMIN "-m${PLATFORM}-version-min=${SDKVER}")
|
||||
|
||||
set(DEPLOYMENT_TARGET "${SDKVER}")
|
||||
|
||||
set(CMAKE_C_COMPILER "${CC}")
|
||||
set(CMAKE_CXX_COMPILER "${CXX}")
|
||||
set(CMAKE_CROSSCOMPILING 1)
|
||||
set(CMAKE_C_FLAGS "${ARCH_FLAGS} ${VERSIONMIN} -isysroot ${SDKROOT}" CACHE STRING "" FORCE)
|
||||
set(CMAKE_CXX_FLAGS "${ARCH_FLAGS} ${VERSIONMIN} -isysroot ${SDKROOT}" CACHE STRING "" FORCE)
|
||||
Reference in New Issue
Block a user