Commit ba16fde
authored
Fix cmake for building pybinds on macOS. (#216)
Fix cmake for building pybinds on macOS.
The recommended platform-independent way
to create a pybind module is pybind11_add_module.
To make this work, we need to make sure the full
pybind11 cmake folder is found, the old fallback
only set PYBIND11_INCLUDE_DIR.
Instead of a find_package+fallback pattern, provide
the cmake folder as a HINT and only do one find_package.
A user can additionally override the hint by setting
pybind11_DIR.
----
Additionaly simplify cmake for building pybinds.
Remove a highly unlikely fallback for Python3_INCLUDE_DIRS.
If we run into this, we likely have other bigger issues.
Combine target_include_directories and link_libraries calls.1 parent 9d0477f commit ba16fde
1 file changed
Lines changed: 18 additions & 41 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
46 | 47 | | |
47 | 48 | | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
59 | 54 | | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
64 | 60 | | |
65 | 61 | | |
66 | | - | |
| 62 | + | |
67 | 63 | | |
68 | 64 | | |
69 | 65 | | |
| |||
74 | 70 | | |
75 | 71 | | |
76 | 72 | | |
77 | | - | |
78 | | - | |
79 | | - | |
| 73 | + | |
80 | 74 | | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
| 75 | + | |
| 76 | + | |
94 | 77 | | |
95 | | - | |
96 | | - | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
97 | 81 | | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | 82 | | |
106 | 83 | | |
107 | 84 | | |
| |||
0 commit comments