[poppler] Branch 'qt5' - 2 commits - CMakeLists.txt qt5/src qt5/tests
Albert Astals Cid
aacid at kemper.freedesktop.org
Mon Jun 17 13:58:29 PDT 2013
CMakeLists.txt | 26 ++++++++++++++++----------
qt5/src/CMakeLists.txt | 1 -
qt5/tests/CMakeLists.txt | 1 -
3 files changed, 16 insertions(+), 12 deletions(-)
New commits:
commit 7cc33a752ef864b595748ce7724ba553a8e3ba8e
Author: Albert Astals Cid <aacid at kde.org>
Date: Mon Jun 17 22:57:56 2013 +0200
We are not compiling an executable
diff --git a/qt5/src/CMakeLists.txt b/qt5/src/CMakeLists.txt
index ddbbb12..2d5ecaf 100644
--- a/qt5/src/CMakeLists.txt
+++ b/qt5/src/CMakeLists.txt
@@ -31,7 +31,6 @@ set(poppler_qt5_SRCS
poppler-media.cc
${CMAKE_SOURCE_DIR}/poppler/ArthurOutputDev.cc
)
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Core_EXECUTABLE_COMPILE_FLAGS}")
add_library(poppler-qt5 SHARED ${poppler_qt5_SRCS})
set_target_properties(poppler-qt5 PROPERTIES VERSION 1.0.0 SOVERSION 1)
target_link_libraries(poppler-qt5 poppler ${Qt5Core_LIBRARIES} ${Qt5Gui_LIBRARIES} ${Qt5Xml_LIBRARIES})
commit 87cfcd41e8e970186c6ce753aa660ef86aca8878
Author: Granger Anthony <grangeranthony at gmail.com>
Date: Mon Jun 17 09:17:51 2013 +0200
Allow to enable Qt5 support only with CMake >= 2.8.8
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3bd6f93..01eb993 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -102,17 +102,23 @@ if(JPEG_FOUND)
set(ENABLE_LIBJPEG ${JPEG_FOUND})
endif(JPEG_FOUND)
macro_optional_find_package(Qt4)
-find_package(Qt5Core)
-find_package(Qt5Gui)
-find_package(Qt5Xml)
-find_package(Qt5Widgets)
-find_package(Qt5Test)
-if (NOT Qt5Core_FOUND AND Qt5Gui_FOUND AND Qt5Xml_FOUND AND Qt5Widgets_FOUND AND Qt5Test_FOUND)
- message("-- Package Qt5Core or Qt5Gui or Qt5Xml or Qt5Widgets or Qt5Test not found")
+if(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION} VERSION_GREATER 2.8.7)
+ find_package(Qt5Core)
+ find_package(Qt5Gui)
+ find_package(Qt5Xml)
+ find_package(Qt5Widgets)
+ find_package(Qt5Test)
+ if (NOT Qt5Core_FOUND AND Qt5Gui_FOUND AND Qt5Xml_FOUND AND Qt5Widgets_FOUND AND Qt5Test_FOUND)
+ message("-- Package Qt5Core or Qt5Gui or Qt5Xml or Qt5Widgets or Qt5Test not found")
+ set(QT5_FOUND false)
+ else(NOT Qt5Core_FOUND AND Qt5Gui_FOUND AND Qt5Xml_FOUND AND Qt5Widgets_FOUND AND Qt5Test_FOUND)
+ set(QT5_FOUND true)
+ endif(NOT Qt5Core_FOUND AND Qt5Gui_FOUND AND Qt5Xml_FOUND AND Qt5Widgets_FOUND AND Qt5Test_FOUND)
+else(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION} VERSION_GREATER 2.8.7)
set(QT5_FOUND false)
-else(NOT Qt5Core_FOUND AND Qt5Gui_FOUND AND Qt5Xml_FOUND AND Qt5Widgets_FOUND AND Qt5Test_FOUND)
- set(QT5_FOUND true)
-endif(NOT Qt5Core_FOUND AND Qt5Gui_FOUND AND Qt5Xml_FOUND AND Qt5Widgets_FOUND AND Qt5Test_FOUND)
+ message("-- CMake >= 2.8.8 is needed to enable Qt5")
+endif(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION} VERSION_GREATER 2.8.7)
+
macro_optional_find_package(Cairo ${CAIRO_VERSION})
if(CAIRO_FOUND)
set(HAVE_CAIRO ${CAIRO_FOUND})
diff --git a/qt5/tests/CMakeLists.txt b/qt5/tests/CMakeLists.txt
index a5b3ef2..4e2d05f 100644
--- a/qt5/tests/CMakeLists.txt
+++ b/qt5/tests/CMakeLists.txt
@@ -37,7 +37,6 @@ macro(QT5_ADD_QTEST exe source)
${source}
)
poppler_add_unittest(${exe} BUILD_QT5_TESTS ${${test_name}_SOURCES})
- qt5_generate_moc(${${test_name}_SOURCES} ${test_name}.moc)
target_link_libraries(${exe} poppler-qt5 ${Qt5Widgets_LIBRARIES} ${Qt5Test_LIBRARIES} ${Qt5Core_LIBRARIES} ${Qt5Gui_LIBRARIES})
if(MSVC)
target_link_libraries(${exe} poppler ${poppler_LIBS})
More information about the poppler
mailing list