Skip to content

Commit

Permalink
Merge pull request #91 from Autodesk/proxy_ufe_vp2renderdelegate
Browse files Browse the repository at this point in the history
Bring base proxy, ufe and vp2renderdelegate from refactoring_sandbox
  • Loading branch information
Krystian Ligenza authored Nov 11, 2019
2 parents 20aa4c0 + 6f34227 commit f8c3e2e
Show file tree
Hide file tree
Showing 321 changed files with 22,602 additions and 2,541 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
*.cproject
*.pydevproject
*.settings/
*.vs
CMakeSettings.json
CMakeCache.txt
CMakeLists.txt.user
CMakeFiles/cmake.check_cache
Expand All @@ -13,4 +15,5 @@ CMakeFiles/cmake.check_cache
*.DS_Store
*.xcuserstate
*.pbxuser
*.swp
*.swp
*.pyc
81 changes: 68 additions & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,29 +1,38 @@
#-
#
# =======================================================================
# Copyright 2019 Autodesk, Inc. All rights reserved.
# Copyright 2019 Autodesk
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at

#
# http://www.apache.org/licenses/LICENSE-2.0

#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# =======================================================================
#+
#

cmake_minimum_required(VERSION 3.1.1)

project(maya-usd)

#==============================================================================
# Define common build variables
#==============================================================================
set(BUILD_PXR_PLUGIN ON CACHE BOOL "Build the Pixar USD plugin and libraries.")
set(BUILD_AL_PLUGIN ON CACHE BOOL "Build the Animal Logic USD plugin and libraries.")

option(BUILD_MAYAUSD_LIBRARY "Build Core USD libraries." ON)
option(BUILD_ADSK_PLUGIN "Build Autodesk USD plugin." ON)
option(BUILD_PXR_PLUGIN "Build the Pixar USD plugin and libraries." ON)
option(BUILD_AL_PLUGIN "Build the Animal Logic USD plugin and libraries." ON)
option(BUILD_TESTS "Build tests." ON)
option(WANT_USD_RELATIVE_PATH "Use relative rpaths for USD libraries" OFF)
option(CMAKE_WANT_UFE_BUILD "Enable building with UFE (if found)." ON)

# Avoid noisy install messages
set(CMAKE_INSTALL_MESSAGE "NEVER")
#==============================================================================
# Modules and Definitions
#==============================================================================
Expand All @@ -32,17 +41,41 @@ list(APPEND CMAKE_MODULE_PATH
${CMAKE_CURRENT_SOURCE_DIR}/cmake/defaults
)

if (BUILD_MAYAUSD_LIBRARY)
include(cmake/mayausd_version.info)
set(MAYAUSD_VERSION "${MAYAUSD_MAJOR_VERSION}.${MAYAUSD_MINOR_VERSION}.${MAYAUSD_PATCH_LEVEL}")
endif()

if (APPLE)
set(OSX_ARCHITECTURES "x86_64")
add_definitions(-DOSMac_ -DMAC_PLUGIN)
add_definitions(-D_BOOL -DREQUIRE_IOSTREAM)
set(CMAKE_OSX_ARCHITECTURES "x86_64")
endif()

include(cmake/python.cmake)
if (DEFINED PYTHON_INCLUDE_DIR AND DEFINED PYTHON_LIBRARIES AND DEFINED PYTHON_EXECUTABLE)
SET(PYTHON_INCLUDE_DIRS "${PYTHON_INCLUDE_DIR}")
SET(PYTHONLIBS_FOUND TRUE)
find_package(PythonInterp 2.7 REQUIRED)
if(NOT PYTHONINTERP_FOUND)
set(PYTHONLIBS_FOUND FALSE)
endif()
endif()
if (NOT PYTHONLIBS_FOUND)
include(cmake/python.cmake)
endif()
include(cmake/utils.cmake)

find_package(Maya REQUIRED)
find_package(USD REQUIRED)
include(cmake/usd.cmake)
include(${USD_CONFIG_FILE})

if(CMAKE_WANT_UFE_BUILD)
find_package(UFE QUIET)
if(UFE_FOUND)
message(STATUS "Building with UFE ${UFE_VERSION} features enabled.")
else()
message(STATUS "UFE not found. UFE features will be disabled.")
endif()
endif()

#==============================================================================
# Compiler
Expand All @@ -51,7 +84,7 @@ include(cmake/usd.cmake)
# Consume them here. This is an effort to keep the most common
# build files readable.
include(CXXDefaults)
add_definitions(${_PXR_CXX_DEFINITIONS})
add_definitions(${_PXR_CXX_DEFINITIONS} -DBOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE)
set(CMAKE_CXX_FLAGS "${_PXR_CXX_FLAGS} ${CMAKE_CXX_FLAGS}")

if(NOT WIN32)
Expand All @@ -63,6 +96,24 @@ endif()
string(REPLACE ";" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")


#==============================================================================
# Tests
#==============================================================================
if (BUILD_TESTS)
include(cmake/Googletest.cmake)
fetch_googletest()

enable_testing()
add_subdirectory(test/lib/ufe)
endif()

#==============================================================================
# CORE
#==============================================================================
if (BUILD_MAYAUSD_LIBRARY)
add_subdirectory(lib)
endif()

#==============================================================================
# PLUGINS
#==============================================================================
Expand All @@ -82,6 +133,9 @@ if (BUILD_AL_PLUGIN)
endif()
endif()

if (BUILD_ADSK_PLUGIN)
add_subdirectory(plugin/adsk)
endif()

#==============================================================================
# Install mayaUSD.mod
Expand All @@ -90,3 +144,4 @@ configure_file(mayaUSD.mod.template ${PROJECT_BINARY_DIR}/mayaUSD.mod)
install(FILES ${PROJECT_BINARY_DIR}/mayaUSD.mod
DESTINATION ${CMAKE_INSTALL_PREFIX}
)

Loading

0 comments on commit f8c3e2e

Please sign in to comment.