backporting some fixes from dev branch

This commit is contained in:
stopiccot 2014-12-17 12:24:20 +03:00
parent acbf9abb1c
commit 3dba1f611b
6 changed files with 47 additions and 4 deletions

View File

@ -287,6 +287,7 @@ option(NO_OPENCL "Disable OpenCL backend" OFF)
option(NO_CLEW "Disable CLEW wrapper library" OFF)
option(NO_GCD "Disable GrandCentralDispatch backend" OFF)
option(NO_NEON "Disable NEON backend" OFF)
option(NO_OPENGL "Disable OpenGL support" OFF)
# Check for dependencies
if(NOT NO_OMP)
@ -295,7 +296,9 @@ endif()
if(NOT NO_TBB)
find_package(TBB 4.0)
endif()
find_package(OpenGL)
if (NOT NO_OPENGL)
find_package(OpenGL)
endif()
find_package(OpenGLES)
if(NOT NO_OPENCL)
if(NOT NO_CLEW)

View File

@ -44,6 +44,7 @@ if (WIN32)
"$ENV{DXSDK_ROOT}/Include"
"C:/Program Files (x86)/Microsoft DirectX SDK*/Include"
"C:/Program Files/Microsoft DirectX SDK*/Include"
"C:/Program Files (x86)/Windows Kits/8.1/Include/um"
)
if ("${CMAKE_GENERATOR}" MATCHES "[Ww]in64")
@ -61,6 +62,7 @@ if (WIN32)
"$ENV{DXSDK_ROOT}/Lib/${ARCH}"
"C:/Program Files (x86)/Microsoft DirectX SDK*/Lib/${ARCH}"
"C:/Program Files/Microsoft DirectX SDK*/Lib/${ARCH}"
"C:/Program Files (x86)/Windows Kits/8.1/Lib/winv6.3/um/${ARCH}"
)
set(DXSDK_LIBRARY_DIR ${LIBRARY_DIR})

View File

@ -43,6 +43,10 @@ if(ANDROID)
)
elseif(IOS)
FIND_PATH( OPENGLES_INCLUDE_DIR
OpenGLES/ES2/gl.h
)
FIND_LIBRARY( OPENGLES_FRAMEWORKS OpenGLES )
if(OPENGLES_FRAMEWORKS)

View File

@ -22,7 +22,7 @@
# language governing permissions and limitations under the Apache License.
#
add_subdirectory(common)
if( OPENGL_FOUND AND (GLEW_FOUND AND GLFW_FOUND) OR (APPLE AND GLFW_FOUND))
@ -34,8 +34,6 @@ if( OPENGL_FOUND AND (GLEW_FOUND AND GLFW_FOUND) OR (APPLE AND GLFW_FOUND))
add_definitions(-DOPENSUBDIV_HAS_PNG)
endif()
add_subdirectory(common)
add_subdirectory(glViewer)
add_subdirectory(glBatchViewer)
add_subdirectory(glStencilViewer)

View File

@ -484,6 +484,7 @@ if (NOT NO_LIB)
# Build static libs ------------------------------------
add_library(osd_static_cpu
STATIC
../version.cpp
$<TARGET_OBJECTS:osd_cpu_obj>
)
set_target_properties(osd_static_cpu PROPERTIES OUTPUT_NAME osdCPU CLEAN_DIRECT_OUTPUT 1)
@ -496,6 +497,7 @@ if (NOT NO_LIB)
# the target then adds the other obj dependencies and include files
_add_possibly_cuda_library(osd_static_gpu
STATIC
../version.cpp
$<TARGET_OBJECTS:osd_gpu_obj>
${KERNEL_FILES}
)
@ -521,6 +523,7 @@ if (NOT NO_LIB)
# generate dynamic-link targets
add_library(osd_dynamic_cpu
SHARED
../version.cpp
$<TARGET_OBJECTS:osd_cpu_obj>
)
@ -545,6 +548,7 @@ if (NOT NO_LIB)
_add_possibly_cuda_library(osd_dynamic_gpu
SHARED
../version.cpp
$<TARGET_OBJECTS:osd_gpu_obj>
${KERNEL_FILES}
)

32
opensubdiv/version.cpp Normal file
View File

@ -0,0 +1,32 @@
//
// Copyright 2013 Pixar
//
// Licensed under the Apache License, Version 2.0 (the "Apache License")
// with the following modification; you may not use this file except in
// compliance with the Apache License and the following modification to it:
// Section 6. Trademarks. is deleted and replaced with:
//
// 6. Trademarks. This License does not grant permission to use the trade
// names, trademarks, service marks, or product names of the Licensor
// and its affiliates, except as required to comply with Section 4(c) of
// the License and to reproduce the content of the NOTICE file.
//
// You may obtain a copy of the Apache License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the Apache License with the above modification is
// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the Apache License for the specific
// language governing permissions and limitations under the Apache License.
//
#include "./version.h"
namespace OpenSubdiv {
namespace OPENSUBDIV_VERSION {
} // end namespace OPENSUBDIV_VERSION
} // end namespace OpenSubdiv