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

PART II: CMake clean ups under lib/mayaUsd and lib/usd #389

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions lib/mayaUsd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ target_include_directories(${PROJECT_NAME}
${MAYA_INCLUDE_DIRS}
${PXR_INCLUDE_DIRS}
$<$<BOOL:${UFE_FOUND}>:${UFE_INCLUDE_DIR}>
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_BINARY_DIR}/include
)

Expand Down Expand Up @@ -152,7 +150,6 @@ add_subdirectory(render)
if(UFE_FOUND)
add_subdirectory(ufe)
endif()

add_subdirectory(utils)

if(BUILD_HDMAYA)
Expand Down
4 changes: 2 additions & 2 deletions lib/mayaUsd/base/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ mayaUsd_promoteHeaderList(HEADERS ${headers} SUBDIR base)
# install
# -----------------------------------------------------------------------------
install(FILES ${headers}
DESTINATION ${CMAKE_INSTALL_PREFIX}/include/mayaUsd/base
DESTINATION ${CMAKE_INSTALL_PREFIX}/include/${PROJECT_NAME}/base
)

install(FILES ${CMAKE_BINARY_DIR}/include/mayaUsd/mayaUsd.h
DESTINATION ${CMAKE_INSTALL_PREFIX}/include/mayaUsd
DESTINATION ${CMAKE_INSTALL_PREFIX}/include/${PROJECT_NAME}
)
77 changes: 10 additions & 67 deletions lib/mayaUsd/fileio/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,41 +23,6 @@ target_sources(${PROJECT_NAME}
shaderWriter.cpp
transformWriter.cpp
writeJobContext.cpp
chaser/chaser.cpp
chaser/chaserRegistry.cpp
jobs/jobArgs.cpp
jobs/modelKindProcessor.cpp
jobs/readJob.cpp
jobs/writeJob.cpp
shading/shadingModeDisplayColor.cpp
shading/shadingModeExporter.cpp
shading/shadingModeExporterContext.cpp
shading/shadingModeImporter.cpp
shading/shadingModePxrRis.cpp
shading/shadingModeRegistry.cpp
shading/shadingModeUseRegistry.cpp
translators/skelBindingsProcessor.cpp
translators/translatorCamera.cpp
translators/translatorCurves.cpp
translators/translatorGprim.cpp
translators/translatorMaterial.cpp
translators/translatorMayaReference.cpp
translators/translatorMesh.cpp
translators/translatorNurbsPatch.cpp
translators/translatorPrim.cpp
translators/translatorRfMLight.cpp
translators/translatorSkel.cpp
translators/translatorUtil.cpp
translators/translatorXformable.cpp
translators/translatorXformable_decompose.cpp
utils/adaptor.cpp
utils/meshUtil.cpp
utils/readUtil.cpp
utils/roundTripUtil.cpp
utils/shadingUtil.cpp
utils/userTaggedAttribute.cpp
utils/writeUtil.cpp
utils/xformStack.cpp
)

set(headers
Expand All @@ -81,37 +46,6 @@ set(headers
shaderWriter.h
transformWriter.h
writeJobContext.h
chaser/chaser.h
chaser/chaserRegistry.h
jobs/jobArgs.h
jobs/modelKindProcessor.h
jobs/readJob.h
jobs/writeJob.h
shading/shadingModeExporterContext.h
shading/shadingModeExporter.h
shading/shadingModeImporter.h
shading/shadingModeRegistry.h
utils/adaptor.h
utils/meshUtil.h
utils/readUtil.h
utils/roundTripUtil.h
utils/shadingUtil.h
utils/userTaggedAttribute.h
utils/writeUtil.h
utils/xformStack.h
translators/skelBindingsProcessor.h
translators/translatorCamera.h
translators/translatorCurves.h
translators/translatorGprim.h
translators/translatorMaterial.h
translators/translatorMayaReference.h
translators/translatorMesh.h
translators/translatorNurbsPatch.h
translators/translatorPrim.h
translators/translatorRfMLight.h
translators/translatorSkel.h
translators/translatorUtil.h
translators/translatorXformable.h
)

# -----------------------------------------------------------------------------
Expand All @@ -123,5 +57,14 @@ mayaUsd_promoteHeaderList(HEADERS ${headers} SUBDIR fileio)
# install
# -----------------------------------------------------------------------------
install(FILES ${headers}
DESTINATION ${CMAKE_INSTALL_PREFIX}/include/mayaUsd/fileio/
DESTINATION ${CMAKE_INSTALL_PREFIX}/include/${PROJECT_NAME}/fileio
)

# -----------------------------------------------------------------------------
# subdirectories
# -----------------------------------------------------------------------------
add_subdirectory(chaser)
add_subdirectory(jobs)
add_subdirectory(shading)
add_subdirectory(translators)
add_subdirectory(utils)
31 changes: 31 additions & 0 deletions lib/mayaUsd/fileio/chaser/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# -----------------------------------------------------------------------------
# sources
# -----------------------------------------------------------------------------
target_sources(${PROJECT_NAME}
PRIVATE
chaser.cpp
chaserRegistry.cpp

)

set(headers
chaser.h
chaserRegistry.h
)

# -----------------------------------------------------------------------------
# promoted headers
# -----------------------------------------------------------------------------
mayaUsd_promoteHeaderList(
HEADERS
${headers}
BASEDIR
${PROJECT_NAME}/fileio/chaser
)

# -----------------------------------------------------------------------------
# install
# -----------------------------------------------------------------------------
install(FILES ${headers}
DESTINATION ${CMAKE_INSTALL_PREFIX}/include/${PROJECT_NAME}/fileio/chaser
)
34 changes: 34 additions & 0 deletions lib/mayaUsd/fileio/jobs/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# -----------------------------------------------------------------------------
# sources
# -----------------------------------------------------------------------------
target_sources(${PROJECT_NAME}
PRIVATE
jobArgs.cpp
modelKindProcessor.cpp
readJob.cpp
writeJob.cpp
)

set(headers
jobArgs.h
modelKindProcessor.h
readJob.h
writeJob.h
)

# -----------------------------------------------------------------------------
# promoted headers
# -----------------------------------------------------------------------------
mayaUsd_promoteHeaderList(
HEADERS
${headers}
BASEDIR
${PROJECT_NAME}/fileio/jobs
)

# -----------------------------------------------------------------------------
# install
# -----------------------------------------------------------------------------
install(FILES ${headers}
DESTINATION ${CMAKE_INSTALL_PREFIX}/include/${PROJECT_NAME}/fileio/jobs
)
38 changes: 38 additions & 0 deletions lib/mayaUsd/fileio/shading/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# -----------------------------------------------------------------------------
# sources
# -----------------------------------------------------------------------------
target_sources(${PROJECT_NAME}
PRIVATE
shadingModeDisplayColor.cpp
shadingModeExporter.cpp
shadingModeExporterContext.cpp
shadingModeImporter.cpp
shadingModePxrRis.cpp
shadingModeRegistry.cpp
shadingModeUseRegistry.cpp
)

set(headers
shadingModeExporter.h
shadingModeExporterContext.h
shadingModeImporter.h
shadingModePxrRis_rfm_map.h
shadingModeRegistry.h
)

# -----------------------------------------------------------------------------
# promoted headers
# -----------------------------------------------------------------------------
mayaUsd_promoteHeaderList(
HEADERS
${headers}
BASEDIR
${PROJECT_NAME}/fileio/shading
)

# -----------------------------------------------------------------------------
# install
# -----------------------------------------------------------------------------
install(FILES ${headers}
DESTINATION ${CMAKE_INSTALL_PREFIX}/include/${PROJECT_NAME}/fileio/shading
)
53 changes: 53 additions & 0 deletions lib/mayaUsd/fileio/translators/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# -----------------------------------------------------------------------------
# sources
# -----------------------------------------------------------------------------
target_sources(${PROJECT_NAME}
PRIVATE
skelBindingsProcessor.cpp
translatorCamera.cpp
translatorCurves.cpp
translatorGprim.cpp
translatorMaterial.cpp
translatorMayaReference.cpp
translatorMesh.cpp
translatorNurbsPatch.cpp
translatorPrim.cpp
translatorRfMLight.cpp
translatorSkel.cpp
translatorUtil.cpp
translatorXformable.cpp
translatorXformable_decompose.cpp
)

set(headers
skelBindingsProcessor.h
translatorCamera.h
translatorCurves.h
translatorGprim.h
translatorMaterial.h
translatorMayaReference.h
translatorMesh.h
translatorNurbsPatch.h
translatorPrim.h
translatorRfMLight.h
translatorSkel.h
translatorUtil.h
translatorXformable.h
)

# -----------------------------------------------------------------------------
# promoted headers
# -----------------------------------------------------------------------------
mayaUsd_promoteHeaderList(
HEADERS
${headers}
BASEDIR
${PROJECT_NAME}/fileio/translators
)

# -----------------------------------------------------------------------------
# install
# -----------------------------------------------------------------------------
install(FILES ${headers}
DESTINATION ${CMAKE_INSTALL_PREFIX}/include/${PROJECT_NAME}/fileio/translators
)
42 changes: 42 additions & 0 deletions lib/mayaUsd/fileio/utils/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# -----------------------------------------------------------------------------
# sources
# -----------------------------------------------------------------------------
target_sources(${PROJECT_NAME}
PRIVATE
adaptor.cpp
meshUtil.cpp
readUtil.cpp
roundTripUtil.cpp
shadingUtil.cpp
userTaggedAttribute.cpp
writeUtil.cpp
xformStack.cpp
)

set(headers
adaptor.h
meshUtil.h
readUtil.h
roundTripUtil.h
shadingUtil.h
userTaggedAttribute.h
writeUtil.h
xformStack.h
)

# -----------------------------------------------------------------------------
# promoted headers
# -----------------------------------------------------------------------------
mayaUsd_promoteHeaderList(
HEADERS
${headers}
BASEDIR
${PROJECT_NAME}/fileio/utils
)

# -----------------------------------------------------------------------------
# install
# -----------------------------------------------------------------------------
install(FILES ${headers}
DESTINATION ${CMAKE_INSTALL_PREFIX}/include/${PROJECT_NAME}/fileio/utils
)
2 changes: 1 addition & 1 deletion lib/mayaUsd/listeners/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ mayaUsd_promoteHeaderList(HEADERS ${headers} SUBDIR listeners)
# install
# -----------------------------------------------------------------------------
install(FILES ${headers}
DESTINATION ${CMAKE_INSTALL_PREFIX}/include/mayaUsd/listeners/
DESTINATION ${CMAKE_INSTALL_PREFIX}/include/${PROJECT_NAME}/listeners/
)
2 changes: 1 addition & 1 deletion lib/mayaUsd/nodes/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ mayaUsd_promoteHeaderList(HEADERS ${headers} SUBDIR nodes)
# install
# -----------------------------------------------------------------------------
install(FILES ${headers}
DESTINATION ${CMAKE_INSTALL_PREFIX}/include/mayaUsd/nodes/
DESTINATION ${CMAKE_INSTALL_PREFIX}/include/${PROJECT_NAME}/nodes/
)
8 changes: 0 additions & 8 deletions lib/mayaUsd/python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,6 @@ target_compile_definitions(${PYTHON_TARGET_NAME}
MFB_PACKAGE_MODULE=${PROJECT_NAME}
)

# -----------------------------------------------------------------------------
# include directories
# -----------------------------------------------------------------------------
target_include_directories(${PYTHON_TARGET_NAME}
PRIVATE
${CMAKE_BINARY_DIR}/include
)

# -----------------------------------------------------------------------------
# link libraries
# -----------------------------------------------------------------------------
Expand Down
Loading