From 1122479e9927b78579a51a3553aa153ac44d80f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20M=C3=B6bius?= Date: Wed, 23 Feb 2022 08:58:54 +0100 Subject: [PATCH 01/10] Removed globbing for compile files and headers in OpenMesh Core --- src/OpenMesh/Core/CMakeLists.txt | 142 +++++++++++++++++++++++++++---- 1 file changed, 126 insertions(+), 16 deletions(-) diff --git a/src/OpenMesh/Core/CMakeLists.txt b/src/OpenMesh/Core/CMakeLists.txt index 7a5269cf..7af0a558 100644 --- a/src/OpenMesh/Core/CMakeLists.txt +++ b/src/OpenMesh/Core/CMakeLists.txt @@ -5,24 +5,134 @@ include_directories ( ${CMAKE_CURRENT_SOURCE_DIR} ) -# source code directories -set (directories - . - Geometry - IO - IO/exporter - IO/importer - IO/reader - IO/writer - Mesh - Mesh/gen - System - Utils +set ( headers +Geometry/Config.hh +Geometry/EigenVectorT.hh +Geometry/LoopSchemeMaskT.hh +Geometry/MathDefs.hh +Geometry/NormalConeT.hh +Geometry/NormalConeT_impl.hh +Geometry/Plane3d.hh +Geometry/QuadricT.hh +Geometry/Vector11T.hh +Geometry/VectorT.hh +Geometry/VectorT_inc.hh +IO/BinaryHelper.hh +IO/IOInstances.hh +IO/IOManager.hh +IO/MeshIO.hh +IO/OFFFormat.hh +IO/OMFormat.hh +IO/OMFormatT_impl.hh +IO/Options.hh +IO/SR_binary.hh +IO/SR_binary_spec.hh +IO/SR_rbo.hh +IO/SR_store.hh +IO/SR_types.hh +IO/StoreRestore.hh +IO/exporter/BaseExporter.hh +IO/exporter/ExporterT.hh +IO/importer/BaseImporter.hh +IO/importer/ImporterT.hh +IO/reader/BaseReader.hh +IO/reader/OBJReader.hh +IO/reader/OFFReader.hh +IO/reader/OMReader.hh +IO/reader/PLYReader.hh +IO/reader/STLReader.hh +IO/writer/BaseWriter.hh +IO/writer/OBJWriter.hh +IO/writer/OFFWriter.hh +IO/writer/OMWriter.hh +IO/writer/PLYWriter.hh +IO/writer/STLWriter.hh +IO/writer/VTKWriter.hh +Mesh/ArrayItems.hh +Mesh/ArrayKernel.hh +Mesh/ArrayKernelT_impl.hh +Mesh/AttribKernelT.hh +Mesh/Attributes.hh +Mesh/BaseKernel.hh +Mesh/BaseMesh.hh +Mesh/Casts.hh +Mesh/CirculatorsT.hh +Mesh/DefaultPolyMesh.hh +Mesh/DefaultTriMesh.hh +Mesh/FinalMeshItemsT.hh +Mesh/Handles.hh +Mesh/IteratorsT.hh +Mesh/PolyConnectivity.hh +Mesh/PolyConnectivity_inline_impl.hh +Mesh/PolyMeshT.hh +Mesh/PolyMeshT_impl.hh +Mesh/PolyMesh_ArrayKernelT.hh +Mesh/SmartHandles.hh +Mesh/SmartRange.hh +Mesh/Status.hh +Mesh/Tags.hh +Mesh/Traits.hh +Mesh/TriConnectivity.hh +Mesh/TriMeshT.hh +Mesh/TriMeshT_impl.hh +Mesh/TriMesh_ArrayKernelT.hh +Mesh/gen/circulators_header.hh +Mesh/gen/circulators_template.hh +Mesh/gen/footer.hh +Mesh/gen/iterators_header.hh +Mesh/gen/iterators_template.hh +System/OpenMeshDLLMacros.hh +System/compiler.hh +System/config.hh +System/mostream.hh +System/omstream.hh +Utils/AutoPropertyHandleT.hh +Utils/BaseProperty.hh +Utils/Endian.hh +Utils/GenProg.hh +Utils/HandleToPropHandle.hh +Utils/Noncopyable.hh +Utils/Predicates.hh +Utils/Property.hh +Utils/PropertyContainer.hh +Utils/PropertyCreator.hh +Utils/PropertyManager.hh +Utils/RandomNumberGenerator.hh +Utils/SingletonT.hh +Utils/SingletonT_impl.hh +Utils/color_cast.hh +Utils/typename.hh +Utils/vector_cast.hh +Utils/vector_traits.hh ) -# collect all header and source files -vci_append_files (headers "*.hh" ${directories}) -vci_append_files (sources "*.cc" ${directories}) +set ( sources +IO/BinaryHelper.cc +IO/IOManager.cc +IO/OMFormat.cc +IO/reader/BaseReader.cc +IO/reader/OBJReader.cc +IO/reader/OFFReader.cc +IO/reader/OMReader.cc +IO/reader/PLYReader.cc +IO/reader/STLReader.cc +IO/writer/BaseWriter.cc +IO/writer/OBJWriter.cc +IO/writer/OFFWriter.cc +IO/writer/OMWriter.cc +IO/writer/PLYWriter.cc +IO/writer/STLWriter.cc +IO/writer/VTKWriter.cc +Mesh/ArrayKernel.cc +Mesh/BaseKernel.cc +Mesh/PolyConnectivity.cc +Mesh/TriConnectivity.cc +System/omstream.cc +Utils/BaseProperty.cc +Utils/Endian.cc +Utils/PropertyCreator.cc +Utils/RandomNumberGenerator.cc +) # Disable Library installation when not building OpenMesh on its own but as part of another project! if ( NOT ${CMAKE_PROJECT_NAME} MATCHES "OpenMesh") From 18bc53814a74880daca7d1ddf0ac446dba8f1791 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20M=C3=B6bius?= Date: Wed, 23 Feb 2022 09:03:19 +0100 Subject: [PATCH 02/10] Removed globbing for compile files and headers in OpenMesh Tools --- src/OpenMesh/Tools/CMakeLists.txt | 95 +++++++++++++++++++++++++++++-- 1 file changed, 91 insertions(+), 4 deletions(-) diff --git a/src/OpenMesh/Tools/CMakeLists.txt b/src/OpenMesh/Tools/CMakeLists.txt index 0170e2b8..cf8e58fd 100644 --- a/src/OpenMesh/Tools/CMakeLists.txt +++ b/src/OpenMesh/Tools/CMakeLists.txt @@ -18,12 +18,99 @@ set (directories VDPM ) -# collect all header and source files -vci_append_files (headers "*.hh" ${directories}) -vci_append_files (sources "*.cc" ${directories}) +set ( headers +Decimater/BaseDecimaterT.hh +Decimater/BaseDecimaterT_impl.hh +Decimater/CollapseInfoT.hh +Decimater/DecimaterT.hh +Decimater/DecimaterT_impl.hh +Decimater/McDecimaterT.hh +Decimater/McDecimaterT_impl.hh +Decimater/MixedDecimaterT.hh +Decimater/MixedDecimaterT_impl.hh +Decimater/ModAspectRatioT.hh +Decimater/ModAspectRatioT_impl.hh +Decimater/ModBaseT.hh +Decimater/ModEdgeLengthT.hh +Decimater/ModEdgeLengthT_impl.hh +Decimater/ModHausdorffT.hh +Decimater/ModHausdorffT_impl.hh +Decimater/ModIndependentSetsT.hh +Decimater/ModNormalDeviationT.hh +Decimater/ModNormalFlippingT.hh +Decimater/ModProgMeshT.hh +Decimater/ModProgMeshT_impl.hh +Decimater/ModQuadricT.hh +Decimater/ModQuadricT_impl.hh +Decimater/ModRoundnessT.hh +Decimater/Observer.hh +Dualizer/meshDualT.hh +Smoother/JacobiLaplaceSmootherT.hh +Smoother/JacobiLaplaceSmootherT_impl.hh +Smoother/LaplaceSmootherT.hh +Smoother/LaplaceSmootherT_impl.hh +Smoother/SmootherT.hh +Smoother/SmootherT_impl.hh +Smoother/smooth_mesh.hh +Subdivider/Adaptive/Composite/CompositeT.hh +Subdivider/Adaptive/Composite/CompositeT_impl.hh +Subdivider/Adaptive/Composite/CompositeTraits.hh +Subdivider/Adaptive/Composite/RuleInterfaceT.hh +Subdivider/Adaptive/Composite/RulesT.hh +Subdivider/Adaptive/Composite/RulesT_impl.hh +Subdivider/Adaptive/Composite/Traits.hh +Subdivider/Uniform/Composite/CompositeT.hh +Subdivider/Uniform/Composite/CompositeT_impl.hh +Subdivider/Uniform/Composite/CompositeTraits.hh +Subdivider/Uniform/CatmullClarkT.hh +Subdivider/Uniform/CatmullClarkT_impl.hh +Subdivider/Uniform/CompositeLoopT.hh +Subdivider/Uniform/CompositeSqrt3T.hh +Subdivider/Uniform/LongestEdgeT.hh +Subdivider/Uniform/LoopT.hh +Subdivider/Uniform/MidpointT.hh +Subdivider/Uniform/ModifiedButterFlyT.hh +Subdivider/Uniform/Sqrt3InterpolatingSubdividerLabsikGreinerT.hh +Subdivider/Uniform/Sqrt3T.hh +Subdivider/Uniform/SubdividerT.hh +Utils/Config.hh +Utils/GLConstAsString.hh +Utils/Gnuplot.hh +Utils/HeapT.hh +Utils/MeshCheckerT.hh +Utils/MeshCheckerT_impl.hh +Utils/NumLimitsT.hh +Utils/StripifierT.hh +Utils/StripifierT_impl.hh +Utils/TestingFramework.hh +Utils/Timer.hh +Utils/conio.hh +VDPM/MeshTraits.hh +VDPM/StreamingDef.hh +VDPM/VFront.hh +VDPM/VHierarchy.hh +VDPM/VHierarchyNode.hh +VDPM/VHierarchyNodeIndex.hh +VDPM/VHierarchyWindow.hh +VDPM/ViewingParameters.hh +) + + +set ( sources +Decimater/Observer.cc +Utils/Gnuplot.cc +Utils/Timer.cc +Utils/conio.cc +VDPM/VFront.cc +VDPM/VHierarchy.cc +VDPM/VHierarchyNodeIndex.cc +VDPM/VHierarchyWindow.cc +VDPM/ViewingParameters.cc +) + IF(WIN32 AND NOT MINGW) - vci_append_files (sources "*.c" ${directories}) + list(APPEND sources "Utils/getopt.c") ENDIF(WIN32 AND NOT MINGW) # Disable Library installation when not building OpenMesh on its own but as part of another project! From 777f58f75e15ee0128ea8d19cfe4814788d91479 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20M=C3=B6bius?= Date: Wed, 23 Feb 2022 09:14:33 +0100 Subject: [PATCH 03/10] Set include directories for tools and core per target and not globally --- src/OpenMesh/Core/CMakeLists.txt | 23 ++++++++++++++---- src/OpenMesh/Tools/CMakeLists.txt | 39 ++++++++++++++----------------- 2 files changed, 35 insertions(+), 27 deletions(-) diff --git a/src/OpenMesh/Core/CMakeLists.txt b/src/OpenMesh/Core/CMakeLists.txt index 7af0a558..977e2188 100644 --- a/src/OpenMesh/Core/CMakeLists.txt +++ b/src/OpenMesh/Core/CMakeLists.txt @@ -1,10 +1,5 @@ include (VCICommon) -include_directories ( - ../.. - ${CMAKE_CURRENT_SOURCE_DIR} -) - set ( headers Geometry/Config.hh Geometry/EigenVectorT.hh @@ -145,13 +140,31 @@ if (WIN32) if ( OPENMESH_BUILD_SHARED ) add_definitions( -DOPENMESHDLL -DBUILDOPENMESHDLL) vci_add_library (OpenMeshCore SHARED ${sources} ${headers}) + + target_include_directories(OpenMeshCore PUBLIC + $ + $) + else() # OpenMesh has no dll exports so we have to build a static library on windows vci_add_library (OpenMeshCore STATIC ${sources} ${headers}) + + target_include_directories(OpenMeshCoreStatic PUBLIC + $ + $) endif() else () vci_add_library (OpenMeshCore SHAREDANDSTATIC ${sources} ${headers}) + + target_include_directories(OpenMeshCore PUBLIC + $ + $) + + target_include_directories(OpenMeshCoreStatic PUBLIC + $ + $) + set_target_properties (OpenMeshCore PROPERTIES VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR} SOVERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR} ) endif () diff --git a/src/OpenMesh/Tools/CMakeLists.txt b/src/OpenMesh/Tools/CMakeLists.txt index cf8e58fd..91e3b692 100644 --- a/src/OpenMesh/Tools/CMakeLists.txt +++ b/src/OpenMesh/Tools/CMakeLists.txt @@ -1,23 +1,5 @@ include (VCICommon) -include_directories ( - ../.. - ${CMAKE_CURRENT_SOURCE_DIR} -) - -# source code directories -set (directories - . - Decimater - Dualizer - Smoother - Subdivider/Adaptive/Composite - Subdivider/Uniform/Composite - Subdivider/Uniform - Utils - VDPM -) - set ( headers Decimater/BaseDecimaterT.hh Decimater/BaseDecimaterT_impl.hh @@ -124,13 +106,30 @@ if (WIN32) if ( OPENMESH_BUILD_SHARED ) add_definitions( -DOPENMESHDLL -DBUILDOPENMESHDLL) vci_add_library (OpenMeshTools SHARED ${sources} ${headers}) + + target_include_directories(OpenMeshTools PUBLIC + $ + $) else() # OpenMesh has no dll exports so we have to build a static library on windows vci_add_library (OpenMeshTools STATIC ${sources} ${headers}) + + target_include_directories(OpenMeshToolsStatic PUBLIC + $ + $) endif() else () vci_add_library (OpenMeshTools SHAREDANDSTATIC ${sources} ${headers}) + + target_include_directories(OpenMeshTools PUBLIC + $ + $) + + target_include_directories(OpenMeshToolsStatic PUBLIC + $ + $) + set_target_properties (OpenMeshTools PROPERTIES VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR} SOVERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR} ) endif () @@ -208,10 +207,6 @@ install(FILES Utils/getopt.h DESTINATION include/OpenMesh/Tools/Utils) endif () -target_include_directories(OpenMeshTools PUBLIC - $ - $) - install(TARGETS OpenMeshTools EXPORT OpenMeshConfig ARCHIVE DESTINATION ${VCI_PROJECT_LIBDIR} LIBRARY DESTINATION ${VCI_PROJECT_LIBDIR} From a81865c6ffa3699c25a31cef2b7d774773b2e5cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20M=C3=B6bius?= Date: Wed, 23 Feb 2022 09:24:18 +0100 Subject: [PATCH 04/10] Use implicit include directories via target link libraries for building apps --- .../Apps/Decimating/DecimaterGui/CMakeLists.txt | 5 ----- .../Decimating/commandlineDecimater/CMakeLists.txt | 5 ----- src/OpenMesh/Apps/Dualizer/CMakeLists.txt | 4 ---- src/OpenMesh/Apps/ProgViewer/CMakeLists.txt | 6 ------ src/OpenMesh/Apps/QtViewer/CMakeLists.txt | 10 ---------- src/OpenMesh/Apps/Smoothing/CMakeLists.txt | 5 ----- .../Apps/Subdivider/SubdividerGui/CMakeLists.txt | 5 ----- .../commandlineAdaptiveSubdivider/CMakeLists.txt | 5 ----- .../Subdivider/commandlineSubdivider/CMakeLists.txt | 5 ----- src/OpenMesh/Apps/VDProgMesh/Analyzer/CMakeLists.txt | 5 ----- .../Apps/VDProgMesh/Synthesizer/CMakeLists.txt | 5 ----- .../Apps/VDProgMesh/mkbalancedpm/CMakeLists.txt | 5 ----- src/OpenMesh/Apps/mconvert/CMakeLists.txt | 4 ---- 13 files changed, 69 deletions(-) diff --git a/src/OpenMesh/Apps/Decimating/DecimaterGui/CMakeLists.txt b/src/OpenMesh/Apps/Decimating/DecimaterGui/CMakeLists.txt index d6230e7e..a9a46e38 100644 --- a/src/OpenMesh/Apps/Decimating/DecimaterGui/CMakeLists.txt +++ b/src/OpenMesh/Apps/Decimating/DecimaterGui/CMakeLists.txt @@ -1,10 +1,5 @@ include (VCICommon) -include_directories ( - ../../../.. - ${CMAKE_CURRENT_SOURCE_DIR} -) - set (headers ../DecimaterViewerWidget.hh ../../QtViewer/QGLViewerWidget.hh diff --git a/src/OpenMesh/Apps/Decimating/commandlineDecimater/CMakeLists.txt b/src/OpenMesh/Apps/Decimating/commandlineDecimater/CMakeLists.txt index de6118f3..00b06a5a 100644 --- a/src/OpenMesh/Apps/Decimating/commandlineDecimater/CMakeLists.txt +++ b/src/OpenMesh/Apps/Decimating/commandlineDecimater/CMakeLists.txt @@ -1,10 +1,5 @@ include (VCICommon) -include_directories ( - ../../../.. - ${CMAKE_CURRENT_SOURCE_DIR} -) - vci_add_executable (commandlineDecimater ../decimater.cc) target_link_libraries (commandlineDecimater diff --git a/src/OpenMesh/Apps/Dualizer/CMakeLists.txt b/src/OpenMesh/Apps/Dualizer/CMakeLists.txt index d4cbac17..51b6fe47 100644 --- a/src/OpenMesh/Apps/Dualizer/CMakeLists.txt +++ b/src/OpenMesh/Apps/Dualizer/CMakeLists.txt @@ -1,9 +1,5 @@ include (VCICommon) -include_directories ( - ../../.. -) - vci_add_executable (Dualizer dualizer.cc) target_link_libraries (Dualizer diff --git a/src/OpenMesh/Apps/ProgViewer/CMakeLists.txt b/src/OpenMesh/Apps/ProgViewer/CMakeLists.txt index 2a3e2daf..3fea20a6 100644 --- a/src/OpenMesh/Apps/ProgViewer/CMakeLists.txt +++ b/src/OpenMesh/Apps/ProgViewer/CMakeLists.txt @@ -1,11 +1,5 @@ include (VCICommon) -include_directories ( - ../../.. - ${CMAKE_CURRENT_SOURCE_DIR} -) - - set( headers ProgViewerWidget.hh ../QtViewer/QGLViewerWidget.hh diff --git a/src/OpenMesh/Apps/QtViewer/CMakeLists.txt b/src/OpenMesh/Apps/QtViewer/CMakeLists.txt index 38fb3e33..fd401fb5 100644 --- a/src/OpenMesh/Apps/QtViewer/CMakeLists.txt +++ b/src/OpenMesh/Apps/QtViewer/CMakeLists.txt @@ -1,15 +1,5 @@ include (VCICommon) -include_directories ( - ../../.. - ${CMAKE_CURRENT_SOURCE_DIR} -) - -# source code directories -set (directories - . -) - set (sources MeshViewerWidget.cc QGLViewerWidget.cc diff --git a/src/OpenMesh/Apps/Smoothing/CMakeLists.txt b/src/OpenMesh/Apps/Smoothing/CMakeLists.txt index e3c24bf8..3c2520f4 100644 --- a/src/OpenMesh/Apps/Smoothing/CMakeLists.txt +++ b/src/OpenMesh/Apps/Smoothing/CMakeLists.txt @@ -1,10 +1,5 @@ include (VCICommon) -include_directories ( - ../../.. - ${CMAKE_CURRENT_SOURCE_DIR} -) - vci_add_executable (Smoothing smooth.cc) target_link_libraries (Smoothing diff --git a/src/OpenMesh/Apps/Subdivider/SubdividerGui/CMakeLists.txt b/src/OpenMesh/Apps/Subdivider/SubdividerGui/CMakeLists.txt index b981841b..7cb64773 100644 --- a/src/OpenMesh/Apps/Subdivider/SubdividerGui/CMakeLists.txt +++ b/src/OpenMesh/Apps/Subdivider/SubdividerGui/CMakeLists.txt @@ -1,10 +1,5 @@ include (VCICommon) -include_directories ( - ../../../.. - ${CMAKE_CURRENT_SOURCE_DIR} -) - set (headers ../MeshViewerWidget.hh ../SubdivideWidget.hh diff --git a/src/OpenMesh/Apps/Subdivider/commandlineAdaptiveSubdivider/CMakeLists.txt b/src/OpenMesh/Apps/Subdivider/commandlineAdaptiveSubdivider/CMakeLists.txt index b89243b0..456476d3 100644 --- a/src/OpenMesh/Apps/Subdivider/commandlineAdaptiveSubdivider/CMakeLists.txt +++ b/src/OpenMesh/Apps/Subdivider/commandlineAdaptiveSubdivider/CMakeLists.txt @@ -1,10 +1,5 @@ include (VCICommon) -include_directories ( - ../../../.. - ${CMAKE_CURRENT_SOURCE_DIR} -) - vci_add_executable (commandlineAdaptiveSubdivider ../adaptive_subdivider.cc) target_link_libraries (commandlineAdaptiveSubdivider diff --git a/src/OpenMesh/Apps/Subdivider/commandlineSubdivider/CMakeLists.txt b/src/OpenMesh/Apps/Subdivider/commandlineSubdivider/CMakeLists.txt index d341ad6b..1c9ce524 100644 --- a/src/OpenMesh/Apps/Subdivider/commandlineSubdivider/CMakeLists.txt +++ b/src/OpenMesh/Apps/Subdivider/commandlineSubdivider/CMakeLists.txt @@ -1,10 +1,5 @@ include (VCICommon) -include_directories ( - ../../../.. - ${CMAKE_CURRENT_SOURCE_DIR} -) - vci_add_executable (commandlineSubdivider ../subdivider.cc) target_link_libraries (commandlineSubdivider diff --git a/src/OpenMesh/Apps/VDProgMesh/Analyzer/CMakeLists.txt b/src/OpenMesh/Apps/VDProgMesh/Analyzer/CMakeLists.txt index 6b73f101..1519d104 100644 --- a/src/OpenMesh/Apps/VDProgMesh/Analyzer/CMakeLists.txt +++ b/src/OpenMesh/Apps/VDProgMesh/Analyzer/CMakeLists.txt @@ -1,10 +1,5 @@ include (VCICommon) -include_directories ( - ../../../.. - ${CMAKE_CURRENT_SOURCE_DIR} -) - vci_add_executable (Analyzer vdpmanalyzer.cc) target_link_libraries (Analyzer diff --git a/src/OpenMesh/Apps/VDProgMesh/Synthesizer/CMakeLists.txt b/src/OpenMesh/Apps/VDProgMesh/Synthesizer/CMakeLists.txt index 1cc83663..983cd2ab 100644 --- a/src/OpenMesh/Apps/VDProgMesh/Synthesizer/CMakeLists.txt +++ b/src/OpenMesh/Apps/VDProgMesh/Synthesizer/CMakeLists.txt @@ -1,10 +1,5 @@ include (VCICommon) -include_directories ( - ../../../.. - ${CMAKE_CURRENT_SOURCE_DIR} -) - set (headers VDPMSynthesizerViewerWidget.hh ) diff --git a/src/OpenMesh/Apps/VDProgMesh/mkbalancedpm/CMakeLists.txt b/src/OpenMesh/Apps/VDProgMesh/mkbalancedpm/CMakeLists.txt index 7d8e1a10..0f61f634 100644 --- a/src/OpenMesh/Apps/VDProgMesh/mkbalancedpm/CMakeLists.txt +++ b/src/OpenMesh/Apps/VDProgMesh/mkbalancedpm/CMakeLists.txt @@ -1,10 +1,5 @@ include (VCICommon) -include_directories ( - ../../../.. - ${CMAKE_CURRENT_SOURCE_DIR} -) - vci_add_executable (mkbalancedpm mkbalancedpm.cc) target_link_libraries (mkbalancedpm diff --git a/src/OpenMesh/Apps/mconvert/CMakeLists.txt b/src/OpenMesh/Apps/mconvert/CMakeLists.txt index 2aa7f742..b05d1d17 100644 --- a/src/OpenMesh/Apps/mconvert/CMakeLists.txt +++ b/src/OpenMesh/Apps/mconvert/CMakeLists.txt @@ -1,9 +1,5 @@ include (VCICommon) -include_directories ( - ../../.. -) - vci_add_executable (mconvert mconvert.cc) target_link_libraries (mconvert From 09267c3e3d8efedd19e395a75aad3129fc0fd347 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20M=C3=B6bius?= Date: Wed, 23 Feb 2022 09:29:19 +0100 Subject: [PATCH 05/10] Fixed win32 static part --- src/OpenMesh/Core/CMakeLists.txt | 15 +++++---------- src/OpenMesh/Tools/CMakeLists.txt | 12 ++++-------- 2 files changed, 9 insertions(+), 18 deletions(-) diff --git a/src/OpenMesh/Core/CMakeLists.txt b/src/OpenMesh/Core/CMakeLists.txt index 977e2188..46f0beb6 100644 --- a/src/OpenMesh/Core/CMakeLists.txt +++ b/src/OpenMesh/Core/CMakeLists.txt @@ -140,20 +140,15 @@ if (WIN32) if ( OPENMESH_BUILD_SHARED ) add_definitions( -DOPENMESHDLL -DBUILDOPENMESHDLL) vci_add_library (OpenMeshCore SHARED ${sources} ${headers}) - - target_include_directories(OpenMeshCore PUBLIC - $ - $) - else() - # OpenMesh has no dll exports so we have to build a static library on windows vci_add_library (OpenMeshCore STATIC ${sources} ${headers}) - - target_include_directories(OpenMeshCoreStatic PUBLIC - $ - $) endif() + target_include_directories(OpenMeshCore PUBLIC + $ + $) + + else () vci_add_library (OpenMeshCore SHAREDANDSTATIC ${sources} ${headers}) diff --git a/src/OpenMesh/Tools/CMakeLists.txt b/src/OpenMesh/Tools/CMakeLists.txt index 91e3b692..1c90491e 100644 --- a/src/OpenMesh/Tools/CMakeLists.txt +++ b/src/OpenMesh/Tools/CMakeLists.txt @@ -106,19 +106,15 @@ if (WIN32) if ( OPENMESH_BUILD_SHARED ) add_definitions( -DOPENMESHDLL -DBUILDOPENMESHDLL) vci_add_library (OpenMeshTools SHARED ${sources} ${headers}) - - target_include_directories(OpenMeshTools PUBLIC - $ - $) else() # OpenMesh has no dll exports so we have to build a static library on windows vci_add_library (OpenMeshTools STATIC ${sources} ${headers}) - - target_include_directories(OpenMeshToolsStatic PUBLIC - $ - $) endif() + target_include_directories(OpenMeshTools PUBLIC + $ + $) + else () vci_add_library (OpenMeshTools SHAREDANDSTATIC ${sources} ${headers}) From 3f2b96d73e38ffc86e07f5ebcec1502a9ede4cf6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20M=C3=B6bius?= Date: Wed, 23 Feb 2022 10:07:08 +0100 Subject: [PATCH 06/10] Removed extra include directive --- src/OpenMesh/Core/CMakeLists.txt | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/OpenMesh/Core/CMakeLists.txt b/src/OpenMesh/Core/CMakeLists.txt index 46f0beb6..832e2ff0 100644 --- a/src/OpenMesh/Core/CMakeLists.txt +++ b/src/OpenMesh/Core/CMakeLists.txt @@ -259,10 +259,6 @@ install(DIRECTORY IO/ PATTERN "Debian*" EXCLUDE ) endif () -target_include_directories(OpenMeshCore PUBLIC - $ - $) - install(TARGETS OpenMeshCore EXPORT OpenMeshConfig ARCHIVE DESTINATION ${VCI_PROJECT_LIBDIR} LIBRARY DESTINATION ${VCI_PROJECT_LIBDIR} From 049f2834f6d112d2ac8ba4f25dc7379747ee7047 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20M=C3=B6bius?= Date: Wed, 23 Feb 2022 10:07:25 +0100 Subject: [PATCH 07/10] Cosmetics --- src/OpenMesh/Tools/CMakeLists.txt | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/OpenMesh/Tools/CMakeLists.txt b/src/OpenMesh/Tools/CMakeLists.txt index 1c90491e..08baecbd 100644 --- a/src/OpenMesh/Tools/CMakeLists.txt +++ b/src/OpenMesh/Tools/CMakeLists.txt @@ -186,9 +186,8 @@ else() endif() if (NOT APPLE AND NOT ${OPENMESH_NO_INSTALL_HEADERS}) - -# Install Header Files -install(DIRECTORY . + # Install Header Files + install(DIRECTORY . DESTINATION include/OpenMesh/Tools FILES_MATCHING PATTERN "*.hh" @@ -198,9 +197,8 @@ install(DIRECTORY . PATTERN "Templates" EXCLUDE PATTERN "Debian*" EXCLUDE) -#install the config file -install(FILES Utils/getopt.h DESTINATION include/OpenMesh/Tools/Utils) - + #install the config file + install(FILES Utils/getopt.h DESTINATION include/OpenMesh/Tools/Utils) endif () install(TARGETS OpenMeshTools EXPORT OpenMeshConfig From 7ccfc169a0d02bfab2ec0d19b75b4d46af59fd7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20M=C3=B6bius?= Date: Wed, 23 Feb 2022 10:07:39 +0100 Subject: [PATCH 08/10] Updated changelog --- Doc/changelog.docu | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Doc/changelog.docu b/Doc/changelog.docu index 857f45d4..ec0f2ac3 100644 --- a/Doc/changelog.docu +++ b/Doc/changelog.docu @@ -8,6 +8,11 @@ 9.1 (?/?/?) +Build System +
    +
  • Removed globbing for Core and Tools library include and source files
  • +
  • Removed global includes from App builds
  • +
From 4a9fb88bfdc8071fba648f1208423f12d1814011 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20M=C3=B6bius?= Date: Wed, 23 Feb 2022 10:10:19 +0100 Subject: [PATCH 09/10] Removed unnecessary include directories --- src/Unittests/CMakeLists.txt | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/Unittests/CMakeLists.txt b/src/Unittests/CMakeLists.txt index 0c2a61d4..d6dcebaf 100644 --- a/src/Unittests/CMakeLists.txt +++ b/src/Unittests/CMakeLists.txt @@ -1,10 +1,5 @@ include (VCICommon) -include_directories ( - .. - ${CMAKE_CURRENT_SOURCE_DIR} -) - if ( NOT DEFINED OPENMESH_BUILD_UNIT_TESTS) set( OPENMESH_BUILD_UNIT_TESTS false CACHE BOOL "Enable or disable unit test builds in OpenMesh." ) endif() From 878474a0aa7de58b1bf7b151bfb2e6a207a59c14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20M=C3=B6bius?= Date: Wed, 23 Feb 2022 10:14:10 +0100 Subject: [PATCH 10/10] Removed globbing for unittest files --- src/Unittests/CMakeLists.txt | 64 +++++++++++++++++++++++++++++++++++- 1 file changed, 63 insertions(+), 1 deletion(-) diff --git a/src/Unittests/CMakeLists.txt b/src/Unittests/CMakeLists.txt index d6dcebaf..133fd41c 100644 --- a/src/Unittests/CMakeLists.txt +++ b/src/Unittests/CMakeLists.txt @@ -1,5 +1,68 @@ include (VCICommon) +set( UNITTEST_SRC +unittests.cc +unittests_add_face.cc +unittests_boundary.cc +unittests_centroid_calculations.cc +unittests_convert_meshes.cc +unittests_cpp_11_features.cc +unittests_decimater.cc +unittests_delete_face.cc +unittests_eigen3_type.cc +unittests_faceless_mesh.cc +unittests_mc_decimater.cc +unittests_mesh_cast.cc +unittests_mesh_dual.cc +unittests_mesh_type.cc +unittests_mixed_decimater.cc +unittests_normal_calculations.cc +unittests_polymesh_collapse.cc +unittests_polymesh_vec2i.cc +unittests_property.cc +unittests_propertymanager.cc +unittests_randomNumberGenerator.cc +unittests_read_write_OBJ.cc +unittests_read_write_OFF.cc +unittests_read_write_OM.cc +unittests_read_write_PLY.cc +unittests_read_write_STL.cc +unittests_set_positions_directly.cc +unittests_smart_handles.cc +unittests_smart_ranges.cc +unittests_smarttagger.cc +unittests_smoother.cc +unittests_split_copy.cc +unittests_split_edge_copy.cc +unittests_sr_binary.cc +unittests_stripifier.cc +unittests_subdivider_adaptive.cc +unittests_subdivider_uniform.cc +unittests_trimesh_circulator_current_halfedge_handle_replacement.cc +unittests_trimesh_circulator_face_edge.cc +unittests_trimesh_circulator_face_face.cc +unittests_trimesh_circulator_face_halfedge.cc +unittests_trimesh_circulator_face_vertex.cc +unittests_trimesh_circulator_halfedge_loop.cc +unittests_trimesh_circulator_vertex_edge.cc +unittests_trimesh_circulator_vertex_face.cc +unittests_trimesh_circulator_vertex_ihalfedge.cc +unittests_trimesh_circulator_vertex_ohalfedge.cc +unittests_trimesh_circulator_vertex_vertex.cc +unittests_trimesh_collapse.cc +unittests_trimesh_garbage_collection.cc +unittests_trimesh_iterators.cc +unittests_trimesh_others.cc +unittests_trimesh_ranges.cc +unittests_trimesh_split.cc +unittests_trimesh_vec2i.cc +unittests_tutorials.cc +unittests_vdpm.cc +unittests_vector_type.cc +) + + + if ( NOT DEFINED OPENMESH_BUILD_UNIT_TESTS) set( OPENMESH_BUILD_UNIT_TESTS false CACHE BOOL "Enable or disable unit test builds in OpenMesh." ) endif() @@ -30,7 +93,6 @@ if ( OPENMESH_BUILD_UNIT_TESTS ) endif() # Create new target named unittests_hexmeshing - FILE(GLOB UNITTEST_SRC *.cc) # Create unittest executable vci_add_executable(unittests ${UNITTEST_SRC}) vci_add_executable(unittests_customvec ${UNITTEST_SRC})