[poppler] 3 commits - CMakeLists.txt cmake/modules cpp/CMakeLists.txt qt4/tests qt5/CMakeLists.txt qt5/demos qt5/src qt5/tests
Albert Astals Cid
aacid at kemper.freedesktop.org
Mon Dec 28 10:26:39 PST 2015
CMakeLists.txt | 4 --
cmake/modules/FindLIBOPENJPEG.cmake | 37 ++++++++++++++++----------
cpp/CMakeLists.txt | 3 --
qt4/tests/CMakeLists.txt | 44 +++++++++++++++----------------
qt5/CMakeLists.txt | 2 +
qt5/demos/CMakeLists.txt | 2 -
qt5/src/CMakeLists.txt | 2 -
qt5/tests/CMakeLists.txt | 50 +++++++++++++++++-------------------
8 files changed, 73 insertions(+), 71 deletions(-)
New commits:
commit e3b09727ad96a03ba1250f49486948899b4df793
Author: Adam Reichold <adam.reichold at t-online.de>
Date: Fri Dec 25 14:10:03 2015 +0100
Make detection of version one of OpenJPEG prefer a pkg-config manifest if it exists.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8558564..4e8bcfd 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -442,7 +442,6 @@ elseif (LIBOPENJPEG2_FOUND)
poppler/JPEG2000Stream.cc
)
add_definitions(-DUSE_OPENJPEG2)
-MESSAGE(${LIBOPENJPEG2_LIBRARIES})
set(poppler_LIBS ${poppler_LIBS} ${LIBOPENJPEG2_LIBRARIES})
else ()
set(poppler_SRCS ${poppler_SRCS}
diff --git a/cmake/modules/FindLIBOPENJPEG.cmake b/cmake/modules/FindLIBOPENJPEG.cmake
index d9c1369..8a49193 100644
--- a/cmake/modules/FindLIBOPENJPEG.cmake
+++ b/cmake/modules/FindLIBOPENJPEG.cmake
@@ -23,31 +23,40 @@ else (LIBOPENJPEG_LIBRARIES AND LIBOPENJPEG_INCLUDE_DIR)
set(LIBOPENJPEG_LIBRARIES)
set(LIBOPENJPEG_INCLUDE_DIR)
- find_path (LIBOPENJPEG_INCLUDE_DIR openjpeg.h PATH_SUFFIXES openjpeg)
- find_library(LIBOPENJPEG_LIBRARIES openjpeg)
- if(LIBOPENJPEG_INCLUDE_DIR AND LIBOPENJPEG_LIBRARIES)
+ find_package(PkgConfig REQUIRED)
+ pkg_check_modules(LIBOPENJPEG libopenjpeg)
- set(CMAKE_REQUIRED_INCLUDES ${LIBOPENJPEG_INCLUDE_DIR})
- set(CMAKE_REQUIRED_LIBRARIES ${LIBOPENJPEG_LIBRARIES})
+ if(LIBOPENJPEG_FOUND)
+ add_definitions(-DUSE_OPENJPEG1)
+ set(LIBOPENJPEG_INCLUDE_DIR ${LIBOPENJPEG_INCLUDE_DIRS})
+ else(LIBOPENJPEG_FOUND)
-check_cxx_source_compiles("
+ find_path (LIBOPENJPEG_INCLUDE_DIR openjpeg.h PATH_SUFFIXES openjpeg)
+ find_library(LIBOPENJPEG_LIBRARIES openjpeg)
+ if(LIBOPENJPEG_INCLUDE_DIR AND LIBOPENJPEG_LIBRARIES)
+
+ set(CMAKE_REQUIRED_INCLUDES ${LIBOPENJPEG_INCLUDE_DIR})
+ set(CMAKE_REQUIRED_LIBRARIES ${LIBOPENJPEG_LIBRARIES})
+
+ check_cxx_source_compiles("
#include <openjpeg.h>
int main()
{
int foo = OPJ_DPARAMETERS_IGNORE_PCLR_CMAP_CDEF_FLAG;
return 0;
-}
-" WITH_OPENJPEG_IGNORE_PCLR_CMAP_CDEF_FLAG)
+}"
+ WITH_OPENJPEG_IGNORE_PCLR_CMAP_CDEF_FLAG)
- set(CMAKE_REQUIRED_INCLUDES)
- set(CMAKE_REQUIRED_LIBRARIES)
+ set(CMAKE_REQUIRED_INCLUDES)
+ set(CMAKE_REQUIRED_LIBRARIES)
- set(LIBOPENJPEG_FOUND TRUE)
- endif(LIBOPENJPEG_INCLUDE_DIR AND LIBOPENJPEG_LIBRARIES)
+ set(LIBOPENJPEG_FOUND TRUE)
+ endif(LIBOPENJPEG_INCLUDE_DIR AND LIBOPENJPEG_LIBRARIES)
- include(FindPackageHandleStandardArgs)
- find_package_handle_standard_args(LibOpenJPEG DEFAULT_MSG LIBOPENJPEG_LIBRARIES LIBOPENJPEG_INCLUDE_DIR)
+ include(FindPackageHandleStandardArgs)
+ find_package_handle_standard_args(LibOpenJPEG DEFAULT_MSG LIBOPENJPEG_LIBRARIES LIBOPENJPEG_INCLUDE_DIR)
+ endif (LIBOPENJPEG_FOUND)
endif (LIBOPENJPEG_LIBRARIES AND LIBOPENJPEG_INCLUDE_DIR)
set(LIBOPENJPEG_INCLUDE_DIRS ${LIBOPENJPEG_INCLUDE_DIR})
commit 7c880daecfcddac2f8181d5f3d506dd409812dbe
Author: Adam Reichold <adam.reichold at t-online.de>
Date: Fri Dec 25 14:10:03 2015 +0100
Make use of LINK_PRIVATE flag to fix warning on CMake policy 0022.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a1412d8..8558564 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -479,8 +479,7 @@ else(MSVC)
add_library(poppler SHARED ${poppler_SRCS})
endif(MSVC)
set_target_properties(poppler PROPERTIES VERSION 58.0.0 SOVERSION 58)
-target_link_libraries(poppler ${poppler_LIBS})
-target_link_libraries(poppler LINK_INTERFACE_LIBRARIES "")
+target_link_libraries(poppler LINK_PRIVATE ${poppler_LIBS})
install(TARGETS poppler RUNTIME DESTINATION bin LIBRARY DESTINATION lib${LIB_SUFFIX} ARCHIVE DESTINATION lib${LIB_SUFFIX})
if(ENABLE_XPDF_HEADERS)
diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt
index 5a94219..1128016 100644
--- a/cpp/CMakeLists.txt
+++ b/cpp/CMakeLists.txt
@@ -26,9 +26,8 @@ add_library(poppler-cpp SHARED ${poppler_cpp_SRCS})
set_target_properties(poppler-cpp PROPERTIES VERSION 0.2.1 SOVERSION 0)
target_link_libraries(poppler-cpp poppler ${ICONV_LIBRARIES})
if(MSVC)
-target_link_libraries(poppler-cpp ${poppler_LIBS})
+target_link_libraries(poppler-cpp LINK_PRIVATE ${poppler_LIBS})
endif(MSVC)
-target_link_libraries(poppler-cpp LINK_INTERFACE_LIBRARIES "")
install(TARGETS poppler-cpp RUNTIME DESTINATION bin LIBRARY DESTINATION lib${LIB_SUFFIX} ARCHIVE DESTINATION lib${LIB_SUFFIX})
install(FILES
commit 4a413b9b95d5c6815c91adb815254cce97dd5b4b
Author: Adam Reichold <adam.reichold at t-online.de>
Date: Fri Dec 25 14:10:03 2015 +0100
Make target names for Qt4 and Qt5 builds unique so they can be built at the same time using recent CMake and Ninja versions.
diff --git a/qt4/tests/CMakeLists.txt b/qt4/tests/CMakeLists.txt
index 4f16f24..bba868f 100644
--- a/qt4/tests/CMakeLists.txt
+++ b/qt4/tests/CMakeLists.txt
@@ -38,30 +38,30 @@ endmacro(QT4_ADD_QTEST)
qt4_add_simpletest(test-poppler-qt4 test-poppler-qt4.cpp)
qt4_add_simpletest(test-password-qt4 test-password-qt4.cpp)
-qt4_add_simpletest(test-render-to-file test-render-to-file.cpp)
-qt4_add_simpletest(poppler-forms poppler-forms.cpp)
-qt4_add_simpletest(poppler-fonts poppler-fonts.cpp)
-qt4_add_simpletest(poppler_attachments poppler-attachments.cpp)
+qt4_add_simpletest(test-render-to-file-qt4 test-render-to-file.cpp)
+qt4_add_simpletest(poppler-qt4-forms poppler-forms.cpp)
+qt4_add_simpletest(poppler-qt4-fonts poppler-fonts.cpp)
+qt4_add_simpletest(poppler-qt4-attachments poppler-attachments.cpp)
qt4_add_simpletest(stress-poppler-qt4 stress-poppler-qt4.cpp)
-qt4_add_simpletest(stress-poppler-dir stress-poppler-dir.cpp)
+qt4_add_simpletest(stress-poppler-dir-qt4 stress-poppler-dir.cpp)
qt4_add_simpletest(stress-threads-qt4 stress-threads-qt4.cpp)
-qt4_add_simpletest(poppler-texts poppler-texts.cpp)
+qt4_add_simpletest(poppler-qt4-texts poppler-texts.cpp)
-qt4_add_qtest(check_attachments check_attachments.cpp)
-qt4_add_qtest(check_dateConversion check_dateConversion.cpp)
-qt4_add_qtest(check_fonts check_fonts.cpp)
-qt4_add_qtest(check_links check_links.cpp)
-qt4_add_qtest(check_metadata check_metadata.cpp)
-qt4_add_qtest(check_optcontent check_optcontent.cpp)
-qt4_add_qtest(check_pagelayout check_pagelayout.cpp)
-qt4_add_qtest(check_pagemode check_pagemode.cpp)
-qt4_add_qtest(check_password check_password.cpp)
-qt4_add_qtest(check_permissions check_permissions.cpp)
-qt4_add_qtest(check_search check_search.cpp)
-qt4_add_qtest(check_actualtext check_actualtext.cpp)
-qt4_add_qtest(check_lexer check_lexer.cpp)
-qt4_add_qtest(check_pagelabelinfo check_pagelabelinfo.cpp)
-qt4_add_qtest(check_goostring check_goostring.cpp)
+qt4_add_qtest(check_qt4_attachments check_attachments.cpp)
+qt4_add_qtest(check_qt4_dateConversion check_dateConversion.cpp)
+qt4_add_qtest(check_qt4_fonts check_fonts.cpp)
+qt4_add_qtest(check_qt4_links check_links.cpp)
+qt4_add_qtest(check_qt4_metadata check_metadata.cpp)
+qt4_add_qtest(check_qt4_optcontent check_optcontent.cpp)
+qt4_add_qtest(check_qt4_pagelayout check_pagelayout.cpp)
+qt4_add_qtest(check_qt4_pagemode check_pagemode.cpp)
+qt4_add_qtest(check_qt4_password check_password.cpp)
+qt4_add_qtest(check_qt4_permissions check_permissions.cpp)
+qt4_add_qtest(check_qt4_search check_search.cpp)
+qt4_add_qtest(check_qt4_actualtext check_actualtext.cpp)
+qt4_add_qtest(check_qt4_lexer check_lexer.cpp)
+qt4_add_qtest(check_qt4_pagelabelinfo check_pagelabelinfo.cpp)
+qt4_add_qtest(check_qt4_goostring check_goostring.cpp)
if (NOT WIN32)
- qt4_add_qtest(check_strings check_strings.cpp)
+ qt4_add_qtest(check_qt4_strings check_strings.cpp)
endif (NOT WIN32)
diff --git a/qt5/CMakeLists.txt b/qt5/CMakeLists.txt
index a364abf..6bd7a6b 100644
--- a/qt5/CMakeLists.txt
+++ b/qt5/CMakeLists.txt
@@ -1,3 +1,5 @@
+set(CMAKE_AUTOMOC ON)
+
add_subdirectory(src)
add_subdirectory(tests)
add_subdirectory(demos)
diff --git a/qt5/demos/CMakeLists.txt b/qt5/demos/CMakeLists.txt
index 6861e1d..060ff16 100644
--- a/qt5/demos/CMakeLists.txt
+++ b/qt5/demos/CMakeLists.txt
@@ -1,5 +1,3 @@
-set(CMAKE_AUTOMOC ON)
-
add_definitions(${QT5_DEFINITIONS})
add_definitions(${Qt5Core_DEFINITIONS})
add_definitions(${Qt5Gui_DEFINITIONS})
diff --git a/qt5/src/CMakeLists.txt b/qt5/src/CMakeLists.txt
index 1eef04a..091a71f 100644
--- a/qt5/src/CMakeLists.txt
+++ b/qt5/src/CMakeLists.txt
@@ -1,8 +1,6 @@
add_definitions(${QT5_DEFINITIONS})
add_definitions(${Qt5Core_DEFINITIONS})
-set(CMAKE_AUTOMOC ON)
-
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${Qt5Core_INCLUDE_DIRS}
diff --git a/qt5/tests/CMakeLists.txt b/qt5/tests/CMakeLists.txt
index ae0bd6c..b8f1926 100644
--- a/qt5/tests/CMakeLists.txt
+++ b/qt5/tests/CMakeLists.txt
@@ -1,5 +1,3 @@
-set(CMAKE_AUTOMOC ON)
-
add_definitions(${Qt5Core_DEFINITIONS})
add_definitions(-DTESTDATADIR=\"${TESTDATADIR}\")
@@ -37,9 +35,9 @@ macro(QT5_ADD_QTEST exe source)
${source}
)
poppler_add_unittest(${exe} BUILD_QT5_TESTS ${${test_name}_SOURCES})
- target_link_libraries(${exe} poppler-qt5 ${Qt5Widgets_LIBRARIES} ${Qt5Test_LIBRARIES} ${Qt5Core_LIBRARIES} ${Qt5Gui_LIBRARIES})
+ target_link_libraries(${exe} poppler-qt5 ${Qt5Widgets_LIBRARIES} ${Qt5Test_LIBRARIES} ${Qt5Core_LIBRARIES} ${Qt5Gui_LIBRARIES})
if(MSVC)
- target_link_libraries(${exe} poppler ${poppler_LIBS})
+ target_link_libraries(${exe} poppler ${poppler_LIBS})
endif(MSVC)
endif (Qt5Test_FOUND)
endmacro(QT5_ADD_QTEST)
@@ -47,30 +45,30 @@ endmacro(QT5_ADD_QTEST)
qt5_add_simpletest(test-poppler-qt5 test-poppler-qt5.cpp)
qt5_add_simpletest(test-password-qt5 test-password-qt5.cpp)
-qt5_add_simpletest(test-render-to-file test-render-to-file.cpp)
-qt5_add_simpletest(poppler-forms poppler-forms.cpp)
-qt5_add_simpletest(poppler-fonts poppler-fonts.cpp)
-qt5_add_simpletest(poppler_attachments poppler-attachments.cpp)
+qt5_add_simpletest(test-render-to-file-qt5 test-render-to-file.cpp)
+qt5_add_simpletest(poppler-qt5-forms poppler-forms.cpp)
+qt5_add_simpletest(poppler-qt5-fonts poppler-fonts.cpp)
+qt5_add_simpletest(poppler-qt5-attachments poppler-attachments.cpp)
qt5_add_simpletest(stress-poppler-qt5 stress-poppler-qt5.cpp)
-qt5_add_simpletest(stress-poppler-dir stress-poppler-dir.cpp)
+qt5_add_simpletest(stress-poppler-dir-qt5 stress-poppler-dir.cpp)
qt5_add_simpletest(stress-threads-qt5 stress-threads-qt5.cpp)
-qt5_add_simpletest(poppler-texts poppler-texts.cpp)
+qt5_add_simpletest(poppler-qt5-texts poppler-texts.cpp)
-qt5_add_qtest(check_attachments check_attachments.cpp)
-qt5_add_qtest(check_dateConversion check_dateConversion.cpp)
-qt5_add_qtest(check_fonts check_fonts.cpp)
-qt5_add_qtest(check_links check_links.cpp)
-qt5_add_qtest(check_metadata check_metadata.cpp)
-qt5_add_qtest(check_optcontent check_optcontent.cpp)
-qt5_add_qtest(check_pagelayout check_pagelayout.cpp)
-qt5_add_qtest(check_pagemode check_pagemode.cpp)
-qt5_add_qtest(check_password check_password.cpp)
-qt5_add_qtest(check_permissions check_permissions.cpp)
-qt5_add_qtest(check_search check_search.cpp)
-qt5_add_qtest(check_actualtext check_actualtext.cpp)
-qt5_add_qtest(check_lexer check_lexer.cpp)
-qt5_add_qtest(check_pagelabelinfo check_pagelabelinfo.cpp)
-qt5_add_qtest(check_goostring check_goostring.cpp)
+qt5_add_qtest(check_qt5_attachments check_attachments.cpp)
+qt5_add_qtest(check_qt5_dateConversion check_dateConversion.cpp)
+qt5_add_qtest(check_qt5_fonts check_fonts.cpp)
+qt5_add_qtest(check_qt5_links check_links.cpp)
+qt5_add_qtest(check_qt5_metadata check_metadata.cpp)
+qt5_add_qtest(check_qt5_optcontent check_optcontent.cpp)
+qt5_add_qtest(check_qt5_pagelayout check_pagelayout.cpp)
+qt5_add_qtest(check_qt5_pagemode check_pagemode.cpp)
+qt5_add_qtest(check_qt5_password check_password.cpp)
+qt5_add_qtest(check_qt5_permissions check_permissions.cpp)
+qt5_add_qtest(check_qt5_search check_search.cpp)
+qt5_add_qtest(check_qt5_actualtext check_actualtext.cpp)
+qt5_add_qtest(check_qt5_lexer check_lexer.cpp)
+qt5_add_qtest(check_qt5_pagelabelinfo check_pagelabelinfo.cpp)
+qt5_add_qtest(check_qt5_goostring check_goostring.cpp)
if (NOT WIN32)
- qt5_add_qtest(check_strings check_strings.cpp)
+ qt5_add_qtest(check_qt5_strings check_strings.cpp)
endif (NOT WIN32)
More information about the poppler
mailing list