From bbf80bedaa8f96203f74c3c8310ce5d963b93e46 Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Fri, 22 Nov 2013 08:23:11 +0000 Subject: [PATCH] Make .dae support in IfcConvert using OpenCOLLADA optional --- src/ifcconvert/ColladaSerializer.cpp | 3 +++ src/ifcconvert/ColladaSerializer.h | 6 +++++- src/ifcconvert/IfcConvert.cpp | 10 +++++++--- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/ifcconvert/ColladaSerializer.cpp b/src/ifcconvert/ColladaSerializer.cpp index 09b1ff5c2c..9cd6d0ab2d 100644 --- a/src/ifcconvert/ColladaSerializer.cpp +++ b/src/ifcconvert/ColladaSerializer.cpp @@ -17,6 +17,8 @@ * * ********************************************************************************/ +#ifdef WITH_OPENCOLLADA + #include #include "ColladaSerializer.h" @@ -278,3 +280,4 @@ void ColladaSerializer::finalize() { exporter.endDocument(); } +#endif diff --git a/src/ifcconvert/ColladaSerializer.h b/src/ifcconvert/ColladaSerializer.h index 6e0e6e88c0..60646202d5 100644 --- a/src/ifcconvert/ColladaSerializer.h +++ b/src/ifcconvert/ColladaSerializer.h @@ -17,6 +17,8 @@ * * ********************************************************************************/ +#ifdef WITH_OPENCOLLADA + #ifndef COLLADASERIALIZER_H #define COLLADASERIALIZER_H @@ -151,4 +153,6 @@ public: bool isTesselated() const { return true; } }; -#endif \ No newline at end of file +#endif + +#endif diff --git a/src/ifcconvert/IfcConvert.cpp b/src/ifcconvert/IfcConvert.cpp index c5542f9fc3..de81942d04 100644 --- a/src/ifcconvert/IfcConvert.cpp +++ b/src/ifcconvert/IfcConvert.cpp @@ -49,9 +49,11 @@ void printUsage(const boost::program_options::options_description& generic_optio std::cerr << "Usage: IfcConvert [options] []" << std::endl << std::endl << "Converts the geometry in an IFC file into one of the following formats:" << std::endl - << " .obj WaveFront OBJ (a .mtl file is also created)" << std::endl - << " .dae Collada Digital Assets Exchange" << std::endl - << " .stp STEP Standard for the Exchange of Product Data" << std::endl + << " .obj WaveFront OBJ (a .mtl file is also created)" << std::endl; +#ifdef WITH_OPENCOLLADA + std::cerr << " .dae Collada Digital Assets Exchange" << std::endl; +#endif + std::cerr << " .stp STEP Standard for the Exchange of Product Data" << std::endl << " .igs IGES Initial Graphics Exchange Specification" << std::endl << std::endl << "Command line options" << std::endl << generic_options << std::endl @@ -181,8 +183,10 @@ int main(int argc, char** argv) { IfcGeomObjects::Settings(IfcGeomObjects::USE_WORLD_COORDS, true); } serializer = new WaveFrontOBJSerializer(output_filename, mtl_filename); +#ifdef WITH_OPENCOLLADA } else if (output_extension == ".dae") { serializer = new ColladaSerializer(output_filename); +#endif } else if (output_extension == ".stp") { serializer = new StepSerializer(output_filename); } else if (output_extension == ".igs") {