diff --git a/CMakeLists.txt b/CMakeLists.txt index e15b8d1..b4618b3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,11 +4,12 @@ project(compas_libigl) set(CMAKE_CXX_STANDARD 11) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake) -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) -endif() +# Shared 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) +# endif() # Eigen if(WIN32) @@ -36,35 +37,53 @@ find_package(LIBIGL REQUIRED) # geodistance pybind11_add_module(compas_libigl_geodistance MODULE ${CMAKE_CURRENT_SOURCE_DIR}/src/compas_libigl/geodistance/geodistance.cpp) target_link_libraries(compas_libigl_geodistance PRIVATE igl::core) +set_target_properties(compas_libigl_geodistance PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/src/compas_libigl/geodistance/) +set_target_properties(compas_libigl_geodistance PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/src/compas_libigl/geodistance/) # isolines pybind11_add_module(compas_libigl_isolines MODULE ${CMAKE_CURRENT_SOURCE_DIR}/src/compas_libigl/isolines/isolines.cpp) target_link_libraries(compas_libigl_isolines PRIVATE igl::core) +set_target_properties(compas_libigl_isolines PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/src/compas_libigl/isolines/) +set_target_properties(compas_libigl_isolines PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/src/compas_libigl/isolines/) # planarize pybind11_add_module(compas_libigl_planarize MODULE ${CMAKE_CURRENT_SOURCE_DIR}/src/compas_libigl/planarize/planarize.cpp) target_link_libraries(compas_libigl_planarize PRIVATE igl::core) +set_target_properties(compas_libigl_planarize PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/src/compas_libigl/planarize/) +set_target_properties(compas_libigl_planarize PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/src/compas_libigl/planarize/) # massmatrix 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 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 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 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 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 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/) +set_target_properties(compas_libigl_meshing PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/src/compas_libigl/meshing/) diff --git a/src/compas_libigl/boundaries/__init__.py b/src/compas_libigl/boundaries/__init__.py index 5f60e2c..9dff8e4 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.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 008ca34..526043a 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.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 2191bc4..16b0778 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.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 3a0749d..33836c9 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.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 ac68526..105d267 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.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 5872da3..78e37b6 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.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 3f21c12..23b5c43 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.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 e745ccf..eab8b12 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.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 431ec20..22da0a1 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.compas_libigl_planarize import planarize_quads as _planarize_quads +from .compas_libigl_planarize import planarize_quads as _planarize_quads from compas.plugins import plugin