diff --git a/CMakeLists.txt b/CMakeLists.txt index c5b99cb..9f6f652 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,12 +4,11 @@ project(compas_libigl) set(CMAKE_CXX_STANDARD 11) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake) -# Shared library output directory +# MODULE library output directory # if(WIN32) # set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/src/compas_libigl) # else() -set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/src/compas_libigl) - +# set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/src/compas_libigl) # endif() # Eigen @@ -36,7 +35,7 @@ option(LIBIGL_WITH_CGAL "Use CGAL" OFF) find_package(LIBIGL REQUIRED) # geodistance -pybind11_add_module(compas_libigl_geodistance SHARED ${CMAKE_CURRENT_SOURCE_DIR}/src/compas_libigl/geodistance/geodistance.cpp) +pybind11_add_module(compas_libigl_geodistance MODULE ${CMAKE_CURRENT_SOURCE_DIR}/src/compas_libigl/geodistance/geodistance.cpp) # set_target_properties(compas_libigl_geodistance # PROPERTIES @@ -46,7 +45,7 @@ pybind11_add_module(compas_libigl_geodistance SHARED ${CMAKE_CURRENT_SOURCE_DIR} target_link_libraries(compas_libigl_geodistance PRIVATE igl::core) # isolines -pybind11_add_module(compas_libigl_isolines SHARED ${CMAKE_CURRENT_SOURCE_DIR}/src/compas_libigl/isolines/isolines.cpp) +pybind11_add_module(compas_libigl_isolines MODULE ${CMAKE_CURRENT_SOURCE_DIR}/src/compas_libigl/isolines/isolines.cpp) # set_target_properties(compas_libigl_isolines # PROPERTIES @@ -56,7 +55,7 @@ pybind11_add_module(compas_libigl_isolines SHARED ${CMAKE_CURRENT_SOURCE_DIR}/sr target_link_libraries(compas_libigl_isolines PRIVATE igl::core) # planarize -pybind11_add_module(compas_libigl_planarize SHARED ${CMAKE_CURRENT_SOURCE_DIR}/src/compas_libigl/planarize/planarize.cpp) +pybind11_add_module(compas_libigl_planarize MODULE ${CMAKE_CURRENT_SOURCE_DIR}/src/compas_libigl/planarize/planarize.cpp) # set_target_properties(compas_libigl_planarize # PROPERTIES @@ -66,42 +65,42 @@ pybind11_add_module(compas_libigl_planarize SHARED ${CMAKE_CURRENT_SOURCE_DIR}/s target_link_libraries(compas_libigl_planarize PRIVATE igl::core) # massmatrix -pybind11_add_module(compas_libigl_massmatrix SHARED ${CMAKE_CURRENT_SOURCE_DIR}/src/compas_libigl/massmatrix/massmatrix.cpp) +pybind11_add_module(compas_libigl_massmatrix MODULE ${CMAKE_CURRENT_SOURCE_DIR}/src/compas_libigl/massmatrix/massmatrix.cpp) target_link_libraries(compas_libigl_massmatrix PRIVATE igl::core) # set_target_properties(compas_libigl_massmatrix PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/src/compas_libigl/massmatrix/) # set_target_properties(compas_libigl_massmatrix PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/src/compas_libigl/massmatrix/) # curvature -pybind11_add_module(compas_libigl_curvature SHARED ${CMAKE_CURRENT_SOURCE_DIR}/src/compas_libigl/curvature/curvature.cpp) +pybind11_add_module(compas_libigl_curvature MODULE ${CMAKE_CURRENT_SOURCE_DIR}/src/compas_libigl/curvature/curvature.cpp) target_link_libraries(compas_libigl_curvature PRIVATE igl::core) # set_target_properties(compas_libigl_curvature PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/src/compas_libigl/curvature/) # set_target_properties(compas_libigl_curvature PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/src/compas_libigl/curvature/) # intersections -pybind11_add_module(compas_libigl_intersections SHARED ${CMAKE_CURRENT_SOURCE_DIR}/src/compas_libigl/intersections/intersections.cpp) +pybind11_add_module(compas_libigl_intersections MODULE ${CMAKE_CURRENT_SOURCE_DIR}/src/compas_libigl/intersections/intersections.cpp) target_link_libraries(compas_libigl_intersections PRIVATE igl::core) # set_target_properties(compas_libigl_intersections PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/src/compas_libigl/intersections/) # set_target_properties(compas_libigl_intersections PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/src/compas_libigl/intersections/) # boundaries -pybind11_add_module(compas_libigl_boundaries SHARED ${CMAKE_CURRENT_SOURCE_DIR}/src/compas_libigl/boundaries/boundaries.cpp) +pybind11_add_module(compas_libigl_boundaries MODULE ${CMAKE_CURRENT_SOURCE_DIR}/src/compas_libigl/boundaries/boundaries.cpp) target_link_libraries(compas_libigl_boundaries PRIVATE igl::core) # set_target_properties(compas_libigl_boundaries PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/src/compas_libigl/boundaries/) # set_target_properties(compas_libigl_boundaries PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/src/compas_libigl/boundaries/) # parametrisations -pybind11_add_module(compas_libigl_parametrisation SHARED ${CMAKE_CURRENT_SOURCE_DIR}/src/compas_libigl/parametrisation/parametrisation.cpp) +pybind11_add_module(compas_libigl_parametrisation MODULE ${CMAKE_CURRENT_SOURCE_DIR}/src/compas_libigl/parametrisation/parametrisation.cpp) target_link_libraries(compas_libigl_parametrisation PRIVATE igl::core) # set_target_properties(compas_libigl_parametrisation PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/src/compas_libigl/parametrisation/) # set_target_properties(compas_libigl_parametrisation PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/src/compas_libigl/parametrisation/) # meshing -pybind11_add_module(compas_libigl_meshing SHARED ${CMAKE_CURRENT_SOURCE_DIR}/src/compas_libigl/meshing/meshing.cpp) +pybind11_add_module(compas_libigl_meshing MODULE ${CMAKE_CURRENT_SOURCE_DIR}/src/compas_libigl/meshing/meshing.cpp) target_link_libraries(compas_libigl_meshing PRIVATE igl::core) # set_target_properties(compas_libigl_meshing PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/src/compas_libigl/meshing/) diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..381c583 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017-2023 compas-dev + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/LICENSE.MPL2 b/LICENSE.igl similarity index 100% rename from LICENSE.MPL2 rename to LICENSE.igl diff --git a/MANIFEST.in b/MANIFEST.in index dc37c43..35a7dc9 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -10,6 +10,7 @@ prune tests prune temp include LICENSE +include LICENSE.igl include README.md include AUTHORS.md include CHANGELOG.md diff --git a/docs/license.rst b/docs/license.rst index b9f27ef..6397775 100644 --- a/docs/license.rst +++ b/docs/license.rst @@ -2,6 +2,10 @@ License ******************************************************************************** -`libigl` (and therefore also `compas_libigl`) is licensed under MPL-2. +``compas_libigl`` is licensed under MIT. -.. literalinclude:: ../LICENSE.MPL2 +.. literalinclude:: ../LICENSE + +``libigl`` is licensed under MPL-2. + +.. literalinclude:: ../LICENSE.igl diff --git a/src/compas_libigl/boundaries/__init__.py b/src/compas_libigl/boundaries/__init__.py index 72ad60e..e6ef0be 100644 --- a/src/compas_libigl/boundaries/__init__.py +++ b/src/compas_libigl/boundaries/__init__.py @@ -1,5 +1,5 @@ import numpy as np -from ..compas_libigl_boundaries import ( +from compas_libigl_boundaries import ( trimesh_boundaries as _trimesh_boundaries, ) diff --git a/src/compas_libigl/curvature/__init__.py b/src/compas_libigl/curvature/__init__.py index 27cd1e6..e0de6aa 100644 --- a/src/compas_libigl/curvature/__init__.py +++ b/src/compas_libigl/curvature/__init__.py @@ -1,5 +1,5 @@ import numpy as np -from ..compas_libigl_curvature import ( +from compas_libigl_curvature import ( trimesh_gaussian_curvature as _gaussian, ) from compas.plugins import plugin diff --git a/src/compas_libigl/geodistance/__init__.py b/src/compas_libigl/geodistance/__init__.py index ef923d8..19d47ea 100644 --- a/src/compas_libigl/geodistance/__init__.py +++ b/src/compas_libigl/geodistance/__init__.py @@ -1,5 +1,5 @@ import numpy as np -from ..compas_libigl_geodistance import ( +from compas_libigl_geodistance import ( trimesh_geodistance_exact as _exact, trimesh_geodistance_heat as _heat, ) diff --git a/src/compas_libigl/intersections/__init__.py b/src/compas_libigl/intersections/__init__.py index e7390cd..0fffe58 100644 --- a/src/compas_libigl/intersections/__init__.py +++ b/src/compas_libigl/intersections/__init__.py @@ -1,5 +1,5 @@ import numpy as np -from ..compas_libigl_intersections import ( +from compas_libigl_intersections import ( intersection_ray_mesh as _intersection_ray_mesh, intersection_rays_mesh as _intersection_rays_mesh, ) diff --git a/src/compas_libigl/isolines/__init__.py b/src/compas_libigl/isolines/__init__.py index 50abc7c..cea8664 100644 --- a/src/compas_libigl/isolines/__init__.py +++ b/src/compas_libigl/isolines/__init__.py @@ -1,6 +1,6 @@ import numpy as np from itertools import groupby -from ..compas_libigl_isolines import trimesh_isolines as _trimesh_isolines +from compas_libigl_isolines import trimesh_isolines as _trimesh_isolines from compas.plugins import plugin diff --git a/src/compas_libigl/massmatrix/__init__.py b/src/compas_libigl/massmatrix/__init__.py index 5168c92..ffa3af3 100644 --- a/src/compas_libigl/massmatrix/__init__.py +++ b/src/compas_libigl/massmatrix/__init__.py @@ -1,5 +1,5 @@ import numpy as np -from ..compas_libigl_massmatrix import ( +from compas_libigl_massmatrix import ( trimesh_massmatrix as _trimesh_massmatrix, ) from compas.plugins import plugin diff --git a/src/compas_libigl/meshing/__init__.py b/src/compas_libigl/meshing/__init__.py index 09fbde4..887fd4f 100644 --- a/src/compas_libigl/meshing/__init__.py +++ b/src/compas_libigl/meshing/__init__.py @@ -1,5 +1,5 @@ import numpy as np -from ..compas_libigl_meshing import ( +from compas_libigl_meshing import ( trimesh_remesh_along_isoline as _trimesh_remesh_along_isolines, ) from compas.plugins import plugin diff --git a/src/compas_libigl/parametrisation/__init__.py b/src/compas_libigl/parametrisation/__init__.py index 24987c8..8a1bf76 100644 --- a/src/compas_libigl/parametrisation/__init__.py +++ b/src/compas_libigl/parametrisation/__init__.py @@ -1,5 +1,5 @@ import numpy as np -from ..compas_libigl_parametrisation import ( +from compas_libigl_parametrisation import ( trimesh_harmonic_map as _harmonic, trimesh_lscm as _lscm, ) diff --git a/src/compas_libigl/planarize/__init__.py b/src/compas_libigl/planarize/__init__.py index 2822a08..14e510c 100644 --- a/src/compas_libigl/planarize/__init__.py +++ b/src/compas_libigl/planarize/__init__.py @@ -1,5 +1,5 @@ import numpy as np -from ..compas_libigl_planarize import planarize_quads as _planarize_quads +from compas_libigl_planarize import planarize_quads as _planarize_quads from compas.plugins import plugin