2014-01-03 22:22:48 +00:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
#
|
|
|
|
|
2014-05-15 20:53:43 +00:00
|
|
|
set(EXAMPLES_COMMON_SHADER_FILES
|
|
|
|
framebuffer.glsl
|
|
|
|
ssao.glsl
|
2015-05-07 20:56:48 +00:00
|
|
|
glslPtexCommon.glsl
|
|
|
|
hlslPtexCommon.hlsl
|
2014-05-15 20:53:43 +00:00
|
|
|
)
|
|
|
|
|
2014-01-03 23:29:43 +00:00
|
|
|
set(EXAMPLES_COMMON_SOURCE_FILES
|
2014-01-03 22:22:48 +00:00
|
|
|
font_image.cpp
|
|
|
|
hdr_reader.cpp
|
|
|
|
hud.cpp
|
2014-09-05 22:07:46 +00:00
|
|
|
objAnim.cpp
|
2014-01-03 22:22:48 +00:00
|
|
|
patchColors.cpp
|
|
|
|
)
|
|
|
|
|
|
|
|
set(EXAMPLES_COMMON_HEADER_FILES
|
|
|
|
font_image.h
|
|
|
|
hdr_reader.h
|
|
|
|
hud.h
|
2014-09-05 22:07:46 +00:00
|
|
|
objAnim.h
|
2014-01-03 22:22:48 +00:00
|
|
|
patchColors.h
|
2015-05-14 00:35:46 +00:00
|
|
|
shaderCache.h
|
2014-01-03 22:22:48 +00:00
|
|
|
simple_math.h
|
2015-04-30 00:37:43 +00:00
|
|
|
stb_image_write.h
|
2014-01-03 22:22:48 +00:00
|
|
|
stopwatch.h
|
|
|
|
)
|
|
|
|
|
|
|
|
if( OPENGL_FOUND AND (GLEW_FOUND AND GLFW_FOUND) OR (APPLE AND GLFW_FOUND))
|
|
|
|
|
|
|
|
list(APPEND EXAMPLES_COMMON_SOURCE_FILES
|
2015-05-19 01:04:38 +00:00
|
|
|
glFramebuffer.cpp
|
|
|
|
glHud.cpp
|
|
|
|
glUtils.cpp
|
2015-05-14 00:35:46 +00:00
|
|
|
glShaderCache.cpp
|
2014-01-03 22:22:48 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
list(APPEND EXAMPLES_COMMON_HEADER_FILES
|
2015-05-19 01:04:38 +00:00
|
|
|
glFramebuffer.h
|
|
|
|
glHud.h
|
|
|
|
glUtils.h
|
2015-05-14 00:35:46 +00:00
|
|
|
glShaderCache.h
|
2014-01-03 22:22:48 +00:00
|
|
|
)
|
2014-01-03 23:29:43 +00:00
|
|
|
|
2014-04-09 22:16:13 +00:00
|
|
|
if (NOT "${OPENGL_INCLUDE_DIR}" STREQUAL "")
|
2014-04-09 22:09:53 +00:00
|
|
|
include_directories("${OPENGL_INCLUDE_DIR}")
|
|
|
|
endif()
|
2014-01-03 23:29:43 +00:00
|
|
|
|
|
|
|
if (GLEW_FOUND)
|
2014-04-09 20:43:38 +00:00
|
|
|
include_directories("${GLEW_INCLUDE_DIR}")
|
2014-01-03 23:29:43 +00:00
|
|
|
endif()
|
|
|
|
|
2014-01-03 22:22:48 +00:00
|
|
|
endif()
|
|
|
|
|
2014-01-03 23:29:43 +00:00
|
|
|
|
2014-01-03 22:22:48 +00:00
|
|
|
if(DXSDK_FOUND)
|
|
|
|
|
|
|
|
list(APPEND EXAMPLES_COMMON_SOURCE_FILES
|
2015-05-19 01:04:38 +00:00
|
|
|
d3d11Hud.cpp
|
|
|
|
d3d11Utils.cpp
|
2015-05-14 00:35:46 +00:00
|
|
|
d3d11ShaderCache.cpp
|
2014-01-03 22:22:48 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
list(APPEND EXAMPLES_COMMON_HEADER_FILES
|
2015-05-19 01:04:38 +00:00
|
|
|
d3d11Hud.h
|
|
|
|
d3d11Utils.h
|
2015-05-14 00:35:46 +00:00
|
|
|
d3d11ShaderCache.h
|
2014-01-03 22:22:48 +00:00
|
|
|
)
|
2014-01-03 23:29:43 +00:00
|
|
|
|
2014-04-09 20:43:38 +00:00
|
|
|
include_directories("${DXSDK_INCLUDE_DIR}")
|
2014-01-03 23:29:43 +00:00
|
|
|
|
2014-01-03 22:22:48 +00:00
|
|
|
endif()
|
|
|
|
|
2015-04-28 22:46:37 +00:00
|
|
|
if(OPENCL_FOUND)
|
2014-04-09 20:43:38 +00:00
|
|
|
include_directories("${OPENCL_INCLUDE_DIRS}")
|
2015-04-28 22:46:37 +00:00
|
|
|
|
|
|
|
list(APPEND EXAMPLES_COMMON_SOURCE_FILES
|
|
|
|
clDeviceContext.cpp
|
|
|
|
)
|
|
|
|
list(APPEND EXAMPLES_COMMON_HEADER_FILES
|
|
|
|
clDeviceContext.h
|
|
|
|
)
|
2014-02-22 21:37:11 +00:00
|
|
|
endif()
|
|
|
|
|
2015-04-28 22:46:37 +00:00
|
|
|
if(CUDA_FOUND)
|
|
|
|
include_directories("${CUDA_INCLUDE_DIRS}")
|
|
|
|
|
|
|
|
list(APPEND EXAMPLES_COMMON_SOURCE_FILES
|
|
|
|
cudaDeviceContext.cpp
|
|
|
|
)
|
|
|
|
list(APPEND EXAMPLES_COMMON_HEADER_FILES
|
|
|
|
cudaDeviceContext.h
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2015-05-07 20:56:48 +00:00
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
if( PTEX_FOUND )
|
|
|
|
list(APPEND EXAMPLES_COMMON_HEADER_FILES
|
|
|
|
ptexMipmapTextureLoader.h
|
|
|
|
)
|
|
|
|
list(APPEND EXAMPLES_COMMON_SOURCE_FILES
|
|
|
|
ptexMipmapTextureLoader.cpp
|
|
|
|
)
|
|
|
|
if( OPENGL_FOUND )
|
|
|
|
list(APPEND EXAMPLES_COMMON_SOURCE_FILES
|
|
|
|
glPtexMipmapTexture.cpp
|
|
|
|
)
|
|
|
|
list(APPEND EXAMPLES_COMMON_HEADER_FILES
|
|
|
|
glPtexMipmapTexture.h
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
if( DXSDK_FOUND )
|
|
|
|
list(APPEND EXAMPLES_COMMON_SOURCE_FILES
|
|
|
|
d3d11PtexMipmapTexture.cpp
|
|
|
|
)
|
|
|
|
list(APPEND EXAMPLES_COMMON_HEADER_FILES
|
|
|
|
d3d11PtexMipmapTexture.h
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
include_directories( "${PTEX_INCLUDE_DIR}" )
|
|
|
|
list(APPEND PLATFORM_CPU_LIBRARIES
|
|
|
|
${PTEX_LIBRARY}
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
#-------------------------------------------------------------------------------
|
2015-04-28 22:46:37 +00:00
|
|
|
|
2014-01-03 22:22:48 +00:00
|
|
|
include_directories(
|
2014-04-09 20:43:38 +00:00
|
|
|
"${PROJECT_SOURCE_DIR}/opensubdiv"
|
2014-05-15 20:53:43 +00:00
|
|
|
"${CMAKE_CURRENT_BINARY_DIR}"
|
2014-01-03 22:22:48 +00:00
|
|
|
)
|
|
|
|
|
2014-05-15 20:53:43 +00:00
|
|
|
set(INC_FILES )
|
|
|
|
|
|
|
|
_stringify("${EXAMPLES_COMMON_SHADER_FILES}" INC_FILES)
|
|
|
|
|
|
|
|
source_group("Shaders" FILES ${EXAMPLES_COMMON_SHADER_FILES})
|
|
|
|
source_group("Inc" FILES ${INC_FILES})
|
|
|
|
|
2014-01-03 22:22:48 +00:00
|
|
|
add_library(examples_common_obj
|
|
|
|
OBJECT
|
|
|
|
${EXAMPLES_COMMON_SOURCE_FILES}
|
|
|
|
${EXAMPLES_COMMON_HEADER_FILES}
|
2015-04-28 22:46:37 +00:00
|
|
|
${INC_FILES}
|
2014-01-03 22:22:48 +00:00
|
|
|
)
|
2014-05-15 20:53:43 +00:00
|
|
|
|