Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bring base proxy, ufe and vp2renderdelegate from refactoring_sandbox #91

Merged
merged 16 commits into from
Nov 11, 2019
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
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