Skip to content

Commit 7e6d7a8

Browse files
committed
adding bit in pystringConfig to prevent double definition error
1 parent 4cf2ec0 commit 7e6d7a8

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

cmake/pystringConfig.cmake.in

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
@PACKAGE_INIT@
22

3-
include("${CMAKE_CURRENT_LIST_DIR}/pystringTargets.cmake")
4-
5-
check_required_components(pystring pystring_header_only)
6-
EOF
3+
# Prevent double-definition errors
4+
if(NOT TARGET pystring::pystring AND NOT TARGET pystring::pystring_header_only)
5+
include("${CMAKE_CURRENT_LIST_DIR}/pystringTargets.cmake")
6+
endif()
77

8+
check_required_components(pystring)

0 commit comments

Comments
 (0)