Skip to content

Commit

Permalink
Do not call find_package() if package has already been found.
Browse files Browse the repository at this point in the history
  • Loading branch information
rjoomen authored and Levi-Armstrong committed Jul 23, 2023
1 parent 9b1eaaf commit 663df9f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tesseract_common/cmake/FindTinyXML2.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# TinyXML2_FOUND TinyXML2_INCLUDE_DIRS TinyXML2_LIBRARIES

# try to find the CMake config file for TinyXML2 first
find_package(TinyXML2 CONFIG QUIET)
if(NOT TinyXML2_FOUND)
find_package(TinyXML2 CONFIG QUIET)
endif()
if(TinyXML2_FOUND)
message(STATUS "Found TinyXML2 via Config file: ${TinyXML2_DIR}")
if(NOT TINYXML2_LIBRARY)
Expand Down

0 comments on commit 663df9f

Please sign in to comment.