File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -18,8 +18,6 @@ Adds the following functions::
1818
1919#]======================================================]
2020
21- include_guard (GLOBAL )
22-
2321# If we are in subdirectory mode, all IMPORTED targets must be GLOBAL. If we
2422# are in CONFIG mode, they should be "normal" targets instead.
2523# In CMake 3.11+ you can promote a target to global after you create it,
@@ -28,8 +26,13 @@ get_property(
2826 is_config
2927 TARGET pybind11::headers
3028 PROPERTY IMPORTED )
29+
3130if (NOT is_config)
31+ include_guard (GLOBAL )
3232 set (optional_global GLOBAL )
33+ else ()
34+ include_guard (DIRECTORY )
35+ set (optional_global "" )
3336endif ()
3437
3538# If not run in Python mode, we still would like this to at least
Original file line number Diff line number Diff line change 55# All rights reserved. Use of this source code is governed by a
66# BSD-style license that can be found in the LICENSE file.
77
8- include_guard (GLOBAL )
8+ include_guard (DIRECTORY )
99
1010if (pybind11_FIND_QUIETLY)
1111 set (_pybind11_quiet QUIET )
You can’t perform that action at this time.
0 commit comments