Skip to content

Commit

Permalink
refactor: dissolved the dual module and plugin nature for LibiglCopyleft
Browse files Browse the repository at this point in the history
  • Loading branch information
chandan-satija committed Feb 28, 2024
1 parent 0e20c32 commit dec6255
Show file tree
Hide file tree
Showing 8 changed files with 57 additions and 109 deletions.
58 changes: 57 additions & 1 deletion Module/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1 +1,57 @@
add_subdirectory (../src ./bin/)
if(NOT Eigen3_FOUND)
vtk_module_find_package(PACKAGE Eigen3 VERSION 3.3 CONFIG_MODE PRIVATE)
endif()

vtk_module_find_package(PACKAGE CGAL VERSION 5.1.1 CONFIG_MODE PRIVATE)

if(NOT DEFINED LIBIGL_DIR)
message(FATAL_ERROR "The CMake variable LIBIGL_DIR is undefined.")
endif()

if(${LIBIGL_DIR} STREQUAL "")
message(FATAL_ERROR "The CMake variable LIBIGL_DIR is an empty string.")
endif()

if(NOT TARGET igl::core)
include(LibiglOptions)
add_subdirectory(${LIBIGL_DIR} ${CMAKE_BINARY_DIR}/bin/libigl)
endif()

# Define content
set(classes
stkLibiglBoolean3DMesher
)

vtk_module_add_module(ParaView::stkLibiglCopyleft
CLASSES ${classes}
PRIVATE_HEADERS ${private_headers}
)

if(CGAL_FOUND)
include(${CGAL_USE_FILE})

# Activate concurrency ? (turned ON by default)
option(CGAL_ACTIVATE_CONCURRENCY
"Enable concurrency"
ON)

vtk_module_definitions(ParaView::stkLibiglCopyleft PRIVATE NOMINMAX)

# Link with CGAL
vtk_module_link(ParaView::stkLibiglCopyleft PUBLIC CGAL::CGAL)

if(CGAL_ACTIVATE_CONCURRENCY)
if (NOT TARGET TBB::tbb)
find_package(TBB REQUIRED)
endif ()

if(TBB_FOUND)
vtk_module_definitions(ParaView::stkLibiglCopyleft PRIVATE CGAL_LINKED_WITH_TBB)
vtk_module_link(ParaView::stkLibiglCopyleft PRIVATE TBB::tbbmalloc TBB::tbb)
endif(TBB_FOUND)
endif(CGAL_ACTIVATE_CONCURRENCY)
endif(CGAL_FOUND)

vtk_module_include(ParaView::stkLibiglCopyleft PRIVATE ${LIBIGL_DIR}/include)

vtk_module_link(ParaView::stkLibiglCopyleft PUBLIC Eigen3::Eigen)
File renamed without changes.
File renamed without changes.
18 changes: 0 additions & 18 deletions Plugins/Libigl/CMakeLists.txt

This file was deleted.

9 changes: 0 additions & 9 deletions Plugins/Libigl/paraview.plugin

This file was deleted.

1 change: 0 additions & 1 deletion Plugins/Libigl/stkLibiglCopyleft/CMakeLists.txt

This file was deleted.

12 changes: 0 additions & 12 deletions Plugins/Libigl/stkLibiglCopyleft/vtk.module

This file was deleted.

68 changes: 0 additions & 68 deletions src/CMakeLists.txt

This file was deleted.

0 comments on commit dec6255

Please sign in to comment.