Skip to content

Commit

Permalink
Merge pull request #77 from fwilliams/remove_vcglib
Browse files Browse the repository at this point in the history
Remove vcglib and update to permissive license
  • Loading branch information
fwilliams authored Sep 14, 2023
2 parents 406aea6 + 4d997bc commit 4b6a8e4
Show file tree
Hide file tree
Showing 2,694 changed files with 1,358 additions and 1,407,462 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,6 @@ external/manifold/
external/simde/
external/tinyply/
external/numpyeigen/
external/igl/
external/igl/
external/geogram/
external/tinyobjloader/
1 change: 1 addition & 0 deletions .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"${workspaceFolder}/external/geogram/src/lib",
"${workspaceFolder}/src",
"${workspaceFolder}/external",
"${workspaceFolder}/external/tinyobjloader",
"${env:CONDA_PREFIX}/envs/point-cloud-utils/include/python3.10",
"${env:CONDA_PREFIX}/envs/point-cloud-utils/lib/python3.10/site-packages/numpy/core/include/"
],
Expand Down
6 changes: 4 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,13 @@
"regex": "cpp",
"numbers": "cpp",
"semaphore": "cpp",
"stop_token": "cpp"
"stop_token": "cpp",
"sparsecholesky": "cpp"
},
"python.linting.enabled": true,
"python.linting.pylintEnabled": true,
"cmake.environment": {
"PATH": "${env:CONDA_PREFIX}/envs/point_cloud_utils/bin:${env:PATH}"
}
},
"cmake.configureOnOpen": false
}
48 changes: 27 additions & 21 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.10)
project(point-cloud-utils)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_BUILD_TYPE "Release")


Expand Down Expand Up @@ -32,40 +32,44 @@ endif()
set(EXTERNAL_DEP_DIR ${CMAKE_CURRENT_SOURCE_DIR}/external)
include(DownloadExternalDeps)
download_dep(numpyeigen
GIT_REPOSITORY https://github.com/fwilliams/numpyeigen.git
GIT_TAG master
GIT_REPOSITORY https://github.com/fwilliams/numpyeigen.git
GIT_TAG master
)
list(APPEND CMAKE_MODULE_PATH ${EXTERNAL_DEP_DIR}/numpyeigen/cmake)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
include(numpyeigen) # This will define Eigen3::Eigen if we enabled NPE_WITH_EIGEN

download_dep(igl
GIT_REPOSITORY https://github.com/fwilliams/libigl.git
GIT_TAG stable_with_macos_hotfix
GIT_REPOSITORY https://github.com/libigl/libigl.git
GIT_TAG main
)

download_dep(tinyply
GIT_REPOSITORY https://github.com/fwilliams/tinyply.git
GIT_TAG point_cloud_utils
GIT_REPOSITORY https://github.com/ddiakopoulos/tinyply.git
GIT_TAG 2.4
)

download_dep(tinyobjloader
GIT_REPOSITORY https://github.com/tinyobjloader/tinyobjloader.git
GIT_TAG release
)

if(NOT NATIVE_SSE)
# igl has sse hardcoded, so use simde to redirect to the platforms native simd instructions.
download_dep(simde
GIT_REPOSITORY https://github.com/simd-everywhere/simde.git
GIT_TAG dd0b662fd8cf4b1617dbbb4d08aa053e512b08e4
)
GIT_REPOSITORY https://github.com/simd-everywhere/simde.git
GIT_TAG dd0b662fd8cf4b1617dbbb4d08aa053e512b08e4
)
endif()


# Build manifold as a static lib
download_dep(manifold
GIT_REPOSITORY https://github.com/AppledoreM/Manifold
GIT_TAG 28e335f8bfde0721f39fc439e362727c6ad47987
GIT_REPOSITORY https://github.com/AppledoreM/Manifold
GIT_TAG 28e335f8bfde0721f39fc439e362727c6ad47987
)
set(MANIFOLD_SRC_DIR ${EXTERNAL_DEP_DIR}/manifold/src)
set(
manifold_SRC
set(manifold_SRC
${MANIFOLD_SRC_DIR}/BVH.cpp
${MANIFOLD_SRC_DIR}/BVH.h
${MANIFOLD_SRC_DIR}/Intersection.cpp
Expand Down Expand Up @@ -93,7 +97,6 @@ endif()
# add_library(mls_utils STATIC ${mls_utils_SRC})
# set_target_properties(mls_utils PROPERTIES LINKER_LANGUAGE CXX)
# target_include_directories(mls_utils PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/external)
# target_include_directories(mls_utils PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/external/vcglib)
# target_include_directories(mls_utils PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src)
# target_include_directories(mls_utils PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/external/numpyeigen/external/eigen)

Expand All @@ -112,8 +115,8 @@ endif()
set(EMBREE_DIR "${EXTERNAL_DEP_DIR}/embree")
if(NOT TARGET embree)
download_dep(embree
GIT_REPOSITORY https://github.com/embree/embree.git
GIT_TAG v3.13.5
GIT_REPOSITORY https://github.com/embree/embree.git
GIT_TAG v3.13.5
)

# Note: On macOS, building embree as a static lib can only be done with a single ISA target.
Expand All @@ -136,9 +139,13 @@ endif()


# Build geogram
download_dep(geogram
GIT_REPOSITORY https://github.com/fwilliams/geogram-pcu.git
GIT_TAG main
)
set(THIRD_PARTY_DIR ${EXTERNAL_DEP_DIR})
include(geogram)

target_compile_definitions(geogram PUBLIC _LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS)
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
SET_TARGET_PROPERTIES(geogram PROPERTIES COMPILE_FLAGS -fopenmp LINK_FLAGS -fopenmp)
target_compile_options(geogram PUBLIC -fopenmp)
Expand Down Expand Up @@ -199,14 +206,13 @@ npe_add_module(_pcu_internal
target_sources(_pcu_internal PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/src/common/morton_code.cpp)
target_sources(_pcu_internal PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/src/common/geogram_utils.cpp)
target_sources(_pcu_internal PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/src/common/embree_intersector.cpp)
target_sources(_pcu_internal PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/external/vcglib/wrap/ply/plylib.cpp)
# target_sources(_pcu_internal PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/external/tinyply/source/tinyply.cpp)
target_include_directories(_pcu_internal PRIVATE ${EXTERNAL_DEP_DIR}/tinyply/source)
target_include_directories(_pcu_internal PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/external/vcglib)
target_include_directories(_pcu_internal PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src)
target_include_directories(_pcu_internal PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/external/nanoflann)
target_include_directories(_pcu_internal PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/external)
target_include_directories(_pcu_internal PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/external/igl/include)
target_include_directories(_pcu_internal PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/external/tinyobjloader)
target_include_directories(_pcu_internal PRIVATE ${EMBREE_DIR}/include)
target_link_libraries(_pcu_internal PRIVATE embree)
target_link_libraries(_pcu_internal PRIVATE geogram)
Expand All @@ -231,6 +237,7 @@ if(MSVC)
/wd4996 # this function or variable may be unsafe
# This one is when using bools in adjacency matrices
/wd4804 #'+=': unsafe use of type 'bool' in operation
/bigobj # Required for large projects
)
endif()

Expand All @@ -245,4 +252,3 @@ endif()

enable_testing()
add_subdirectory(tests)

Loading

0 comments on commit 4b6a8e4

Please sign in to comment.