Merge pull request #403 from google/maya_fixes

Maya fixes
This commit is contained in:
Tom Finegan 2018-05-24 15:06:44 -07:00 committed by GitHub
commit affc0ad888
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 26 additions and 14 deletions

View File

@ -798,8 +798,6 @@ else ()
add_library(draco_maya_plugin OBJECT add_library(draco_maya_plugin OBJECT
${draco_maya_plug_sources}) ${draco_maya_plug_sources})
# Library targets that consume the object collections. # Library targets that consume the object collections.
add_library(dracodec add_library(dracodec
${draco_version_sources} ${draco_version_sources}
@ -888,28 +886,28 @@ else ()
MODULE MODULE
${draco_version_sources} ${draco_version_sources}
$<TARGET_OBJECTS:draco_maya_plugin> $<TARGET_OBJECTS:draco_maya_plugin>
$<TARGET_OBJECTS:draco_compression_attributes_pred_schemes_enc> $<TARGET_OBJECTS:draco_compression_attributes_pred_schemes_enc>
$<TARGET_OBJECTS:draco_attributes> $<TARGET_OBJECTS:draco_attributes>
$<TARGET_OBJECTS:draco_compression_attributes_dec> $<TARGET_OBJECTS:draco_compression_attributes_dec>
$<TARGET_OBJECTS:draco_compression_decode> $<TARGET_OBJECTS:draco_compression_decode>
$<TARGET_OBJECTS:draco_compression_mesh_dec> $<TARGET_OBJECTS:draco_compression_mesh_dec>
$<TARGET_OBJECTS:draco_compression_point_cloud_dec> $<TARGET_OBJECTS:draco_compression_point_cloud_dec>
$<TARGET_OBJECTS:draco_compression_attributes_enc> $<TARGET_OBJECTS:draco_compression_attributes_enc>
$<TARGET_OBJECTS:draco_compression_encode> $<TARGET_OBJECTS:draco_compression_encode>
$<TARGET_OBJECTS:draco_compression_mesh_enc> $<TARGET_OBJECTS:draco_compression_mesh_enc>
$<TARGET_OBJECTS:draco_compression_point_cloud_enc> $<TARGET_OBJECTS:draco_compression_point_cloud_enc>
$<TARGET_OBJECTS:draco_core> $<TARGET_OBJECTS:draco_core>
$<TARGET_OBJECTS:draco_core_bit_coders> $<TARGET_OBJECTS:draco_core_bit_coders>
$<TARGET_OBJECTS:draco_enc_config> $<TARGET_OBJECTS:draco_enc_config>
$<TARGET_OBJECTS:draco_dec_config> $<TARGET_OBJECTS:draco_dec_config>
$<TARGET_OBJECTS:draco_io> $<TARGET_OBJECTS:draco_io>
$<TARGET_OBJECTS:draco_mesh> $<TARGET_OBJECTS:draco_mesh>
$<TARGET_OBJECTS:draco_metadata> $<TARGET_OBJECTS:draco_metadata>
$<TARGET_OBJECTS:draco_metadata_dec> $<TARGET_OBJECTS:draco_metadata_dec>
$<TARGET_OBJECTS:draco_point_cloud> $<TARGET_OBJECTS:draco_point_cloud>
$<TARGET_OBJECTS:draco_points_dec> $<TARGET_OBJECTS:draco_points_dec>
$<TARGET_OBJECTS:draco_metadata_enc> $<TARGET_OBJECTS:draco_metadata_enc>
$<TARGET_OBJECTS:draco_points_enc>) $<TARGET_OBJECTS:draco_points_enc>)
# For Mac, we need to build a .bundle for plugin. # For Mac, we need to build a .bundle for plugin.
if (APPLE) if (APPLE)
@ -917,8 +915,6 @@ else ()
endif () endif ()
endif () endif ()
set(draco_header_only_targets set(draco_header_only_targets
draco_compression_attributes_pred_schemes_dec draco_compression_attributes_pred_schemes_dec
draco_dec_config draco_dec_config
@ -936,7 +932,7 @@ else ()
if (BUILD_UNITY_PLUGIN AND (NOT APPLE)) if (BUILD_UNITY_PLUGIN AND (NOT APPLE))
set_target_properties(dracodec_unity PROPERTIES SOVERSION 1) set_target_properties(dracodec_unity PROPERTIES SOVERSION 1)
endif () endif ()
if (BUILD_MAYA_PLUGIN) if (BUILD_MAYA_PLUGIN AND (NOT APPLE))
set_target_properties(draco_maya_wrapper PROPERTIES SOVERSION 1) set_target_properties(draco_maya_wrapper PROPERTIES SOVERSION 1)
endif () endif ()
endif () endif ()

View File

@ -51,6 +51,15 @@ You should be able to find the library under:
path/to/build/Debug(or Release)/draco_maya_wrapper.bundle path/to/build/Debug(or Release)/draco_maya_wrapper.bundle
~~~~ ~~~~
The makefile generator will also work:
~~~~~ bash
$ cmake path/to/draco -DBUILD_MAYA_PLUGIN=ON && make
~~~~~
`draco_maya_wrapper.bundle` can be found in the directory where you generated
the build files and ran make.
### Windows ### Windows
On Windows, run the following command to generate Visual Studio projects: On Windows, run the following command to generate Visual Studio projects:
@ -72,5 +81,12 @@ path/to/build/Debug(or Release)/draco_maya_wrapper.dll
~~~~ ~~~~
### Linux ### Linux
[TODO] On Linux, run the following command to generate a Makefile build and build the
plugin.
~~~~~ bash
$ cmake path/to/draco -DBUILD_MAYA_PLUGIN=1 && make
~~~~~
Note: While the linux build completes successfully, the plugin has not been
tested.