Giter VIP home page Giter VIP logo

Comments (5)

mariuszhermansdorfer avatar mariuszhermansdorfer commented on June 26, 2024 1

Thanks @Grantim. This is not a pressing matter. Having followed your steps, I was able to remove the dependency on OpenVDB and now my plugin again works well with Rhino.

Thanks for a super fast response as usual!

As far as I am concerned, this issue can be closed now.

from meshlib.

Grantim avatar Grantim commented on June 26, 2024

Hello!

I suggest in your case the easiest way is to have MeshLib as submodule of your solution like this

MeshLib/readme.md

Lines 257 to 261 in b6c0f54

### Submodule
You can have MeshLib as submodule in your repository, and inculde all MeshLib's projects to your solution.
> **_NOTE:_** You should use `MeshLib/source/common.props` in other projects of your solution.
> **_NOTE:_** You can customize props by defining `CustomMRProps.props` in directory above `common.props`

and with CustomMRProps.props you can define any of these macro

option(MRMESH_NO_CLIPBOARD "Disable clipboard support for Linux and Mac" OFF)
option(MRMESH_NO_PDF "Disable PDF support" OFF)
option(MRMESH_NO_CPR "Disable CPR tests" OFF)
option(MRMESH_NO_PYTHON "Disable Python bindings" OFF)
option(MRMESH_NO_DICOM "Disable DICOM image support" OFF)
option(MRMESH_NO_LABEL "Disable support of label objects" OFF)
option(MRMESH_NO_JPEG "Disable JPEG support" OFF)
option(MRMESH_NO_PNG "Disable PNG support" OFF)
option(MRMESH_NO_TIFF "Disable TIFF support" OFF)
option(MRMESH_NO_VOXEL "Disable voxel support" OFF) # openvdb
option(MRMESH_NO_GLTF "Disable glTF support" OFF)
option(MRMESH_NO_XML "Disable XML support (affects 3MF support)" OFF)
option(MRMESH_NO_E57 "Disable E57 support" OFF)
option(MRMESH_NO_OPENCASCADE "Disable OpenCASCADE usage" OFF)
option(MRMESH_NO_ZLIB "Disable Zlib usage" OFF)

So you will be able to reduce number of dependencies (we didn't really test it on windows, but I believe it should work)


So your solution should look like this
image
CustomMRProps.props file:

<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
    <_PropertySheetDisplayName>Common properties customizatoin</_PropertySheetDisplayName>
  </PropertyGroup>
  <ItemDefinitionGroup>
    <ClCompile>
      <PreprocessorDefinitions>MRMESH_NO_PNG;MRMESH_NO_JPEG;MRMESH_NO_DICOM;MRMESH_NO_PDF;MRMESH_NO_XML;MRMESH_NO_GLTF;MRMESH_NO_ZLIB;MRMESH_NO_CLIPBOARD;MRMESH_NO_E57;MRMESH_NO_CPR;MRMESH_NO_VOXEL;MRMESH_NO_OPENCASCADE;_ITERATOR_DEBUG_LEVEL=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
    </ClCompile>
  </ItemDefinitionGroup>
</Project>

image

MeshLibWrapper.vcxproj file:

     </ImportGroup>
+++  <Import Project="$(ProjectDir)\..\..\MeshLib\source\common.props" />
     <PropertyGroup Label="UserMacros" />

SubmoduleSolution.zip

from meshlib.

mariuszhermansdorfer avatar mariuszhermansdorfer commented on June 26, 2024

Looks super good! Will test and report back. Thanks @Grantim!

from meshlib.

mariuszhermansdorfer avatar mariuszhermansdorfer commented on June 26, 2024

Thanks @Grantim, this looks very promising. I took your example and build it with the following settings:

<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
    <_PropertySheetDisplayName>Common properties customizatoin</_PropertySheetDisplayName>
  </PropertyGroup>
  <ItemDefinitionGroup>
    <ClCompile>
      <PreprocessorDefinitions>
	  MRMESH_NO_CLIPBOARD;
	  MRMESH_NO_PDF;
	  MRMESH_NO_CPR;
	  MRMESH_NO_PYTHON;
	  MRMESH_NO_DICOM;
	  MRMESH_NO_LABEL;
	  MRMESH_NO_JPEG;
	  MRMESH_NO_PNG;
	  MRMESH_NO_TIFF;
	  MRMESH_NO_VOXEL;
	  MRMESH_NO_GLTF;
	  MRMESH_NO_XML;
	  MRMESH_NO_E57;
	  MRMESH_NO_OPENCASCADE;
	  MRMESH_NO_ZLIB;
	  _ITERATOR_DEBUG_LEVEL=0;%(PreprocessorDefinitions)
	  </PreprocessorDefinitions>
    </ClCompile>
  </ItemDefinitionGroup>
</Project>

But still see Python in the output even though it's explicitly excluded above:
image

from meshlib.

Grantim avatar Grantim commented on June 26, 2024

But still see Python in the output even though it's explicitly excluded above:

Python is copied as post build script for MRMesh, its hard to skip this now, anyway I think it is not linked to main dll, so you can remove them from final distribution


EDIT: Probably it is linked, unfortunately to get rid of python in this case it will require some changes in MeshLib (zip file is not used)

from meshlib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.