Set tinyxml2_LIBRARIES after find_package() (#3932)
If tinyxml2 is found by find_package(), then tinyxml2_LIBRARIES is empty. Set tinyxml2_LIBRARIES to "tinyxml2::tinyxml2" in this case. - Fixes "undefined reference to `tinyxml2::" - printInfo.cmake: Fix indentation of tinyxml2_LIBRARIES
This commit is contained in:
parent
9ef14d179d
commit
1cc234ac2c
|
@ -48,12 +48,13 @@ endif()
|
||||||
|
|
||||||
if (NOT USE_BUNDLED_TINYXML2)
|
if (NOT USE_BUNDLED_TINYXML2)
|
||||||
find_package(tinyxml2 QUIET)
|
find_package(tinyxml2 QUIET)
|
||||||
if (NOT tinyxml2_FOUND)
|
if (TARGET tinyxml2::tinyxml2)
|
||||||
|
set(tinyxml2_LIBRARIES "tinyxml2::tinyxml2")
|
||||||
|
else()
|
||||||
find_library(tinyxml2_LIBRARIES tinyxml2)
|
find_library(tinyxml2_LIBRARIES tinyxml2)
|
||||||
if (NOT tinyxml2_LIBRARIES)
|
if (NOT tinyxml2_LIBRARIES)
|
||||||
message(FATAL_ERROR "tinyxml2 has not been found")
|
message(FATAL_ERROR "tinyxml2 has not been found")
|
||||||
else()
|
else()
|
||||||
message(STATUS "tinyxml2_LIBRARY: ${tinyxml2_LIBRARY}")
|
|
||||||
set(tinyxml2_FOUND 1)
|
set(tinyxml2_FOUND 1)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -52,9 +52,10 @@ if (USE_Z3)
|
||||||
message( STATUS "Z3_LIBRARIES = ${Z3_LIBRARIES}" )
|
message( STATUS "Z3_LIBRARIES = ${Z3_LIBRARIES}" )
|
||||||
message( STATUS "Z3_CXX_INCLUDE_DIRS = ${Z3_CXX_INCLUDE_DIRS}" )
|
message( STATUS "Z3_CXX_INCLUDE_DIRS = ${Z3_CXX_INCLUDE_DIRS}" )
|
||||||
endif()
|
endif()
|
||||||
|
message( STATUS )
|
||||||
message( STATUS "USE_BUNDLED_TINYXML2 = ${USE_BUNDLED_TINYXML2}" )
|
message( STATUS "USE_BUNDLED_TINYXML2 = ${USE_BUNDLED_TINYXML2}" )
|
||||||
if (NOT USE_BUNDLED_TINYXML2)
|
if (NOT USE_BUNDLED_TINYXML2)
|
||||||
message(STATUS "tinyxml2_LIBRARIES = ${tinyxml2_LIBRARIES}")
|
message(STATUS "tinyxml2_LIBRARIES = ${tinyxml2_LIBRARIES}")
|
||||||
endif()
|
endif()
|
||||||
message( STATUS )
|
message( STATUS )
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue