[libcalamares] Fix build of tests

- Link Qt::Xml publicly because the tests will need it as well.
This commit is contained in:
Adriaan de Groot 2019-05-10 10:57:50 -04:00
parent 69f05bd34a
commit 81499b22a1

View File

@ -14,6 +14,7 @@ configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/../calamares/CalamaresVersion.h.in
${CMAKE_CURRENT_BINARY_DIR}/CalamaresVersion.h ) ${CMAKE_CURRENT_BINARY_DIR}/CalamaresVersion.h )
set( OPTIONAL_PRIVATE_LIBRARIES "" ) set( OPTIONAL_PRIVATE_LIBRARIES "" )
set( OPTIONAL_PUBLIC_LIBRARIES "" )
set( libSources set( libSources
CppJob.cpp CppJob.cpp
@ -92,7 +93,7 @@ endif()
find_package(Qt5 COMPONENTS Xml) find_package(Qt5 COMPONENTS Xml)
if( Qt5Xml_FOUND ) if( Qt5Xml_FOUND )
list( APPEND libSources geoip/GeoIPXML.cpp ) list( APPEND libSources geoip/GeoIPXML.cpp )
list( APPEND OPTIONAL_PRIVATE_LIBRARIES Qt5::Network Qt5::Xml ) list( APPEND OPTIONAL_PUBLIC_LIBRARIES Qt5::Network Qt5::Xml )
endif() endif()
### LIBRARY ### LIBRARY
@ -112,6 +113,7 @@ target_link_libraries( calamares
LINK_PUBLIC LINK_PUBLIC
${YAMLCPP_LIBRARY} ${YAMLCPP_LIBRARY}
Qt5::Core Qt5::Core
${OPTIONAL_PUBLIC_LIBRARIES}
) )
install( TARGETS calamares install( TARGETS calamares