Skip to content

Commit

Permalink
common windows
Browse files Browse the repository at this point in the history
  • Loading branch information
tomvanmele committed Dec 5, 2023
1 parent 5721a3c commit 42d8408
Show file tree
Hide file tree
Showing 10 changed files with 33 additions and 14 deletions.
29 changes: 24 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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/)
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.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.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.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.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.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.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.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.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.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 42d8408

Please sign in to comment.