Skip to content

Commit fe2251f

Browse files
committed
bad merge
1 parent 076613d commit fe2251f

File tree

2 files changed

+9
-60
lines changed

2 files changed

+9
-60
lines changed

CMakeLists.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,15 @@ set(Python3_FIND_REGISTRY "LAST")
1717
set(Python3_FIND_FRAMEWORK "LAST")
1818
find_package(Python3 COMPONENTS Interpreter Development NumPy REQUIRED)
1919

20+
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
21+
# For newer versions of python (3.8+), C extensions don't link against
22+
# libpython and instead get symbol definitions from the python interpreter
23+
# executable. PDAL plugins need to link against libpython, but if a plugin
24+
# is loaded inside a python process, it must resolve symbols from the python
25+
# executable instead of libpython. Using flat namespace allows that.
26+
set(PYTHON_LINK_LIBRARY ${PYTHON_LINK_LIBRARY} -Wl,-flat_namespace)
27+
endif()
28+
2029
# find PDAL. Require 2.1+
2130
find_package(PDAL 2.1 REQUIRED)
2231

pdal/CMakeLists.txt

Lines changed: 0 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -21,64 +21,4 @@ python_extension_module(${extension})
2121

2222
install(TARGETS ${extension} LIBRARY DESTINATION "pdal")
2323

24-
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
25-
# For newer versions of python (3.8+), C extensions don't link against
26-
# libpython and instead get symbol definitions from the python interpreter
27-
# executable. PDAL plugins need to link against libpython, but if a plugin
28-
# is loaded inside a python process, it must resolve symbols from the python
29-
# executable instead of libpython. Using flat namespace allows that.
30-
set(PYTHON_LINK_LIBRARY ${PYTHON_LINK_LIBRARY} -Wl,-flat_namespace)
31-
endif()
32-
33-
PDAL_PYTHON_ADD_PLUGIN(numpy_reader reader numpy
34-
FILES
35-
./io/NumpyReader.cpp
36-
./io/NumpyReader.hpp
37-
./plang/Invocation.cpp
38-
./plang/Environment.cpp
39-
./plang/Redirector.cpp
40-
./plang/Script.cpp
41-
LINK_WITH
42-
${PDAL_LIBRARIES}
43-
${Python3_LIBRARIES}
44-
${CMAKE_DL_LIBS}
45-
SYSTEM_INCLUDES
46-
${PDAL_INCLUDE_DIRS}
47-
${Python3_INCLUDE_DIRS}
48-
${Python3_NumPy_INCLUDE_DIRS}
49-
COMPILE_OPTIONS
50-
${PYTHON_LINK_LIBRARY}
51-
)
52-
53-
PDAL_PYTHON_ADD_PLUGIN(python_filter filter python
54-
FILES
55-
./filters/PythonFilter.cpp
56-
./filters/PythonFilter.hpp
57-
./plang/Invocation.cpp
58-
./plang/Environment.cpp
59-
./plang/Redirector.cpp
60-
./plang/Script.cpp
61-
LINK_WITH
62-
${PDAL_LIBRARIES}
63-
${Python3_LIBRARIES}
64-
${CMAKE_DL_LIBS}
65-
SYSTEM_INCLUDES
66-
${PDAL_INCLUDE_DIRS}
67-
${Python3_INCLUDE_DIRS}
68-
${Python3_NumPy_INCLUDE_DIRS}
69-
COMPILE_OPTIONS
70-
${PYTHON_LINK_LIBRARY}
71-
)
72-
73-
74-
if (WITH_TESTS)
75-
enable_testing()
76-
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
77-
add_subdirectory(test/gtest)
78-
enable_testing()
79-
include_directories(test/gtest/include .. ${CMAKE_CURRENT_BINARY_DIR})
80-
81-
82-
83-
8424

0 commit comments

Comments
 (0)