Changeset View
Standalone View
source/blender/usd/CMakeLists.txt
- This file was added.
| # ***** BEGIN GPL LICENSE BLOCK ***** | |||||
| # | |||||
| # This program is free software; you can redistribute it and/or | |||||
| # modify it under the terms of the GNU General Public License | |||||
| # as published by the Free Software Foundation; either version 2 | |||||
| # of the License, or (at your option) any later version. | |||||
| # | |||||
| # This program is distributed in the hope that it will be useful, | |||||
| # but WITHOUT ANY WARRANTY; without even the implied warranty of | |||||
| # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||||
| # GNU General Public License for more details. | |||||
| # | |||||
| # You should have received a copy of the GNU General Public License | |||||
| # along with this program; if not, write to the Free Software Foundation, | |||||
| # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | |||||
| # | |||||
| # The Original Code is Copyright (C) 2019, Blender Foundation | |||||
| # All rights reserved. | |||||
| # ***** END GPL LICENSE BLOCK ***** | |||||
| include(${USD_ROOT_DIR}/pxrConfig.cmake) | |||||
LazyDodo: This is not playing nicely with the multi target cmake generators (vs+xcode) since it hardcodes… | |||||
Done Inline ActionsI tried removing it, but then linking fails. Contrary to Alembic (which just links to libAlembic.a), USD is spread over a whole list of smaller libraries. I'll take another look at it, as I would also rather not ship & load those .cmake files. sybren: I tried removing it, but then linking fails. Contrary to Alembic (which just links to… | |||||
| # This suppresses the warning "This file includes at least one deprecated or antiquated header which | |||||
| # may be removed without further notice at a future date", which is caused by the USD library | |||||
| # including <ext/hash_set>. Nothing we can do about that until they change what | |||||
Done Inline ActionsHave "they" been notified? sergey: Have "they" been notified? | |||||
Done Inline Actionsyes: https://github.com/PixarAnimationStudios/USD/issues/1057 (and I also updated the comment) sybren: yes: https://github.com/PixarAnimationStudios/USD/issues/1057
(and I also updated the comment) | |||||
| # they include, so this just suppresses it. | |||||
Done Inline ActionsNot needed with MSVC? XCode? sergey: Not needed with MSVC? XCode? | |||||
Done Inline ActionsNope, just on Linux. I've updated the comment to reflect this. sybren: Nope, just on Linux. I've updated the comment to reflect this. | |||||
Done Inline ActionsWhy not to make if: if(UNIX AND NOT APPLE) add_definitions(-D_GLIBCXX_PERMIT_BACKWARD_HASH) endif() sergey: Why not to make if:
if(UNIX AND NOT APPLE)
add_definitions… | |||||
| add_definitions(-D_GLIBCXX_PERMIT_BACKWARD_HASH) | |||||
| set(INC | |||||
| . | |||||
| ../blenkernel | |||||
| ../blenlib | |||||
| ../blenloader | |||||
| ../bmesh | |||||
| ../depsgraph | |||||
| ../editors/include | |||||
| ../makesdna | |||||
| ../makesrna | |||||
| ../windowmanager | |||||
| ../../../intern/guardedalloc | |||||
| ../../../intern/utfconv | |||||
| ) | |||||
| set(INC_SYS | |||||
| ${PXR_INCLUDE_DIRS} | |||||
| ${BOOST_INCLUDE_DIR} | |||||
Done Inline ActionsPXR_INCLUDE_DIRS -> USD_INCLUDE_DIRS LazyDodo: `PXR_INCLUDE_DIRS` -> `USD_INCLUDE_DIRS` | |||||
Done Inline ActionsI was in doubt about this one. On one hand we set ${USD_INCLUDE_DIRS} in our FindUSD.cmake, but then we loose the symmetry with ${PXR_LIBRARIES} used in the library linking. Same as above: I'll look into revamping the build scripts so that we get rid of the PXR_.... stuff. sybren: I was in doubt about this one. On one hand we set `${USD_INCLUDE_DIRS}` in our `FindUSD.cmake`… | |||||
| ${TBB_INCLUDE_DIR} | |||||
| ) | |||||
| if(WIN32) | |||||
| add_definitions(-DNOMINMAX) | |||||
| endif() | |||||
Done Inline Actionsif we drop the use of pxrconfig.cmake we need add_definitions(-DPXR_STATIC) here. LazyDodo: if we drop the use of pxrconfig.cmake we need
`add_definitions(-DPXR_STATIC)`
here. | |||||
Not Done Inline ActionsIs this to deal with something from USD's headers or from our code? Usually such things also involve NOGDI, and WIN32_LEAN_AND_MEAN. In Cycles we have specialized header for windows.h which takes care of this. So it it's for own code then we should consider doing similar things to Cycles in BLI. sergey: Is this to deal with something from USD's headers or from our code?
Usually such things also… | |||||
Not Done Inline Actionssee comment here https://developer.blender.org/D5359#125560 LazyDodo: see comment here https://developer.blender.org/D5359#125560 | |||||
Done Inline ActionsI still feel this should have some official status, and thus a comment explaining it in the code. @Ray Molenkamp (LazyDodo) can you write something sensible for this? Then I'll include it in the patch. sybren: I still feel this should have some official status, and thus a comment explaining it in the… | |||||
| set(SRC | |||||
| intern/abstract_hierarchy_iterator.cc | |||||
| intern/usd_capi.cc | |||||
| intern/usd_hierarchy_iterator.cc | |||||
| intern/usd_writer_abstract.cc | |||||
| intern/usd_writer_camera.cc | |||||
| intern/usd_writer_hair.cc | |||||
| intern/usd_writer_light.cc | |||||
| intern/usd_writer_mesh.cc | |||||
| intern/usd_writer_transform.cc | |||||
| usd.h | |||||
| intern/abstract_hierarchy_iterator.h | |||||
| intern/usd_hierarchy_iterator.h | |||||
| intern/usd_writer_abstract.h | |||||
| intern/usd_writer_camera.h | |||||
| intern/usd_writer_hair.h | |||||
| intern/usd_writer_light.h | |||||
| intern/usd_writer_mesh.h | |||||
| intern/usd_writer_transform.h | |||||
| ) | |||||
| set(LIB | |||||
| bf_blenkernel | |||||
| bf_blenlib | |||||
| ${PXR_LIBRARIES} | |||||
| ) | |||||
| blender_add_lib(bf_usd "${SRC}" "${INC}" "${INC_SYS}" "${LIB}") | |||||
This is not playing nicely with the multi target cmake generators (vs+xcode) since it hardcodes the release libs also it has absolute paths in it to my build environment.
Given we now have our own findpackege, this can be removed i think?