@@ -17,26 +17,38 @@ else()
1717 list (PREPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR } /cmake)
1818endif ()
1919
20- include (FetchContent )
21- include (pybind11 )
2220
23- find_package (Eigen3 REQUIRED QUIET )
24- find_package (Open3D HINTS ${CMAKE_INSTALL_PREFIX } /lib/CMake )
2521list (APPEND Open3D_LIBRARIES dl)
2622
27- message (STATUS "Found Open3D ${Open3D_VERSION} " )
28- link_directories (${Open3D_LIBRARY_DIRS} )
29-
3023add_subdirectory (patchworkpp )
31- add_subdirectory (python_wrapper )
3224
33- add_executable (demo_visualize examples/cpp/demo_visualize.cpp )
34- target_link_libraries (demo_visualize PRIVATE PATCHWORK::patchworkpp ${Open3D_LIBRARIES} "stdc++fs" )
35- target_include_directories (demo_visualize PUBLIC ${Open3D_INCLUDE_DIRS} )
36- set_target_properties (demo_visualize PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR } /build/examples/cpp" )
25+ if (INCLUDE_PYTHON_WRAPPER)
26+
27+ message (STATUS "Building Python wrapper" )
28+ find_package (Python3 REQUIRED COMPONENTS Interpreter Development.Module )
29+ include (FetchContent )
30+ include (pybind11 )
31+ add_subdirectory (python_wrapper )
32+
33+ endif ()
34+
35+ if (INCLUDE_EXAMPLES)
3736
38- add_executable (demo_sequential examples/cpp/demo_sequential.cpp )
39- target_link_libraries (demo_sequential PRIVATE PATCHWORK::patchworkpp ${Open3D_LIBRARIES} "stdc++fs" )
40- target_include_directories (demo_sequential PUBLIC ${Open3D_INCLUDE_DIRS} )
41- set_target_properties (demo_sequential PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR } /build/examples/cpp" )
37+ message (STATUS "Building examples for c++" )
38+ find_package (Open3D REQUIRED HINTS ${CMAKE_INSTALL_PREFIX } /lib/CMake )
4239
40+ list (APPEND Open3D_LIBRARIES dl)
41+ link_directories (${Open3D_LIBRARY_DIRS} )
42+ message (STATUS "Found Open3D ${Open3D_VERSION} " )
43+
44+ add_executable (demo_visualize examples/cpp/demo_visualize.cpp )
45+ target_link_libraries (demo_visualize PRIVATE PATCHWORK::patchworkpp ${Open3D_LIBRARIES} "stdc++fs" )
46+ target_include_directories (demo_visualize PUBLIC ${Open3D_INCLUDE_DIRS} )
47+ set_target_properties (demo_visualize PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR } /build/examples/cpp" )
48+
49+ add_executable (demo_sequential examples/cpp/demo_sequential.cpp )
50+ target_link_libraries (demo_sequential PRIVATE PATCHWORK::patchworkpp ${Open3D_LIBRARIES} "stdc++fs" )
51+ target_include_directories (demo_sequential PUBLIC ${Open3D_INCLUDE_DIRS} )
52+ set_target_properties (demo_sequential PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR } /build/examples/cpp" )
53+
54+ endif ()
0 commit comments