Skip to content

Commit

Permalink
last attempt
Browse files Browse the repository at this point in the history
  • Loading branch information
tomvanmele committed Dec 5, 2023
1 parent 4cfe29e commit a3bbf61
Show file tree
Hide file tree
Showing 14 changed files with 48 additions and 23 deletions.
23 changes: 11 additions & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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/)
Expand Down
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -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.
File renamed without changes.
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ prune tests
prune temp

include LICENSE
include LICENSE.igl
include README.md
include AUTHORS.md
include CHANGELOG.md
Expand Down
8 changes: 6 additions & 2 deletions docs/license.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion src/compas_libigl/boundaries/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import numpy as np
from ..compas_libigl_boundaries import (
from compas_libigl_boundaries import (
trimesh_boundaries as _trimesh_boundaries,
)

Expand Down
2 changes: 1 addition & 1 deletion src/compas_libigl/curvature/__init__.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/compas_libigl/geodistance/__init__.py
Original file line number Diff line number Diff line change
@@ -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,
)
Expand Down
2 changes: 1 addition & 1 deletion src/compas_libigl/intersections/__init__.py
Original file line number Diff line number Diff line change
@@ -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,
)
Expand Down
2 changes: 1 addition & 1 deletion src/compas_libigl/isolines/__init__.py
Original file line number Diff line number Diff line change
@@ -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


Expand Down
2 changes: 1 addition & 1 deletion src/compas_libigl/massmatrix/__init__.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/compas_libigl/meshing/__init__.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/compas_libigl/parametrisation/__init__.py
Original file line number Diff line number Diff line change
@@ -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,
)
Expand Down
2 changes: 1 addition & 1 deletion src/compas_libigl/planarize/__init__.py
Original file line number Diff line number Diff line change
@@ -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


Expand Down

0 comments on commit a3bbf61

Please sign in to comment.