Commit 7e1832c5 authored by Albert Astals Cid's avatar Albert Astals Cid

autotests: Only compile parttest if you have the pdf support

I'm sure other tests fail to run too, but this one was failing to
compile :D
parent 098a886f
...@@ -90,6 +90,12 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake/modules) ...@@ -90,6 +90,12 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake/modules)
find_package(ZLIB REQUIRED) find_package(ZLIB REQUIRED)
# This is here instead of in generators since we use if(Poppler_Qt5_FOUND) in autotests/
find_package(Poppler "0.12.1" COMPONENTS Qt5)
set_package_properties("Poppler" PROPERTIES
TYPE RECOMMENDED
PURPOSE "Support for PDF files in okular.")
add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS) add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS)
add_definitions(-DTRANSLATION_DOMAIN="okular") add_definitions(-DTRANSLATION_DOMAIN="okular")
add_definitions(-DQT_NO_URL_CAST_FROM_STRING) add_definitions(-DQT_NO_URL_CAST_FROM_STRING)
......
...@@ -7,10 +7,12 @@ ecm_add_test(shelltest.cpp ../shell/shellutils.cpp ...@@ -7,10 +7,12 @@ ecm_add_test(shelltest.cpp ../shell/shellutils.cpp
LINK_LIBRARIES Qt5::Test okularcore LINK_LIBRARIES Qt5::Test okularcore
) )
ecm_add_test(parttest.cpp if(Poppler_Qt5_FOUND)
TEST_NAME "parttest" ecm_add_test(parttest.cpp
LINK_LIBRARIES Qt5::Widgets Qt5::Test Qt5::Xml okularcore okularpart TEST_NAME "parttest"
) LINK_LIBRARIES Qt5::Widgets Qt5::Test Qt5::Xml okularcore okularpart
)
endif()
ecm_add_test(documenttest.cpp ecm_add_test(documenttest.cpp
TEST_NAME "documenttest" TEST_NAME "documenttest"
......
...@@ -7,11 +7,6 @@ function(okular_add_generator _target) ...@@ -7,11 +7,6 @@ function(okular_add_generator _target)
) )
endfunction() endfunction()
find_package(Poppler "0.12.1" COMPONENTS Qt5)
set_package_properties("Poppler" PROPERTIES
TYPE RECOMMENDED
PURPOSE "Support for PDF files in okular.")
set(LIBSPECTRE_MINIMUM_VERSION "0.2") set(LIBSPECTRE_MINIMUM_VERSION "0.2")
find_package(LibSpectre "${LIBSPECTRE_MINIMUM_VERSION}") find_package(LibSpectre "${LIBSPECTRE_MINIMUM_VERSION}")
set_package_properties(LibSpectre PROPERTIES set_package_properties(LibSpectre PROPERTIES
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment