From d4675cf0d12c3f60f7d1d425801200e44ee90150 Mon Sep 17 00:00:00 2001 From: Tom Finegan Date: Thu, 24 May 2018 10:20:36 -0700 Subject: [PATCH 1/3] cmake: Fix mac build Clang @ Apple LLVM version 9.0.0 (clang-900.0.39.2) fails to link when SOVERSION is set for bundles. Don't set it on Apple targets. --- CMakeLists.txt | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ad55545..17a2272 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -798,8 +798,6 @@ else () add_library(draco_maya_plugin OBJECT ${draco_maya_plug_sources}) - - # Library targets that consume the object collections. add_library(dracodec ${draco_version_sources} @@ -888,28 +886,28 @@ else () MODULE ${draco_version_sources} $ - $ + $ $ $ $ $ $ - $ - $ - $ - $ + $ + $ + $ + $ $ $ $ - $ + $ $ $ $ $ $ $ - $ - $) + $ + $) # For Mac, we need to build a .bundle for plugin. if (APPLE) @@ -917,8 +915,6 @@ else () endif () endif () - - set(draco_header_only_targets draco_compression_attributes_pred_schemes_dec draco_dec_config @@ -936,7 +932,7 @@ else () if (BUILD_UNITY_PLUGIN AND (NOT APPLE)) set_target_properties(dracodec_unity PROPERTIES SOVERSION 1) endif () - if (BUILD_MAYA_PLUGIN) + if (BUILD_MAYA_PLUGIN AND (NOT APPLE)) set_target_properties(draco_maya_wrapper PROPERTIES SOVERSION 1) endif () endif () From 4677d014e4a80e6ffedfd81a5fa669fb40c11961 Mon Sep 17 00:00:00 2001 From: Tom Finegan Date: Thu, 24 May 2018 10:21:06 -0700 Subject: [PATCH 2/3] Add macos make build instructions to maya/README.md. --- maya/README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/maya/README.md b/maya/README.md index 755e0f1..b0c90b5 100644 --- a/maya/README.md +++ b/maya/README.md @@ -51,6 +51,15 @@ You should be able to find the library under: 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 On Windows, run the following command to generate Visual Studio projects: From 85d2654fc95e4354a6b7882c0b05e134797d0b9c Mon Sep 17 00:00:00 2001 From: Tom Finegan Date: Thu, 24 May 2018 10:53:41 -0700 Subject: [PATCH 3/3] Add linux instructions for the Maya plugin --- maya/README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/maya/README.md b/maya/README.md index b0c90b5..b33cf3c 100644 --- a/maya/README.md +++ b/maya/README.md @@ -81,5 +81,12 @@ path/to/build/Debug(or Release)/draco_maya_wrapper.dll ~~~~ ### 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.