.gitlab-ci.yml | 3 +-- CMakeLists.txt | 6 +++++- cmake/modules/FindGLIB.cmake | 6 +++++- cmake/modules/FindNSS3.cmake | 6 +++++- glib/CMakeLists.txt | 6 +++++- 5 files changed, 21 insertions(+), 6 deletions(-)
New commits: commit 8076bc66c3bd6897d142fba7e7740ab9baf0cb37 Author: Albert Astals Cid <[email protected]> Date: Sat Jan 19 21:34:23 2019 +0100 Fix link in FreeBSD diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9b9b5ee8..55b5d5ca 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -66,9 +66,8 @@ build_mingw64_fedora: - dnf builddep -y mingw64-poppler - dnf -y install mingw64-curl make ninja-build mingw64-openjpeg2-tools mingw32-openjpeg2-tools script: - - sed -i '/SYSTEM/d' glib/CMakeLists.txt test/CMakeLists.txt - mkdir -p build && cd build - - mingw64-cmake -G Ninja .. + - mingw64-cmake -G Ninja .. -DCMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES:PATH=/usr/x86_64-w64-mingw32/sys-root/mingw/include/ - ninja build_clazy: diff --git a/CMakeLists.txt b/CMakeLists.txt index 8a0ca5cc..cc141d30 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -451,7 +451,11 @@ if (ENABLE_NSS3) set(poppler_SRCS ${poppler_SRCS} poppler/SignatureHandler.cc ) - set(poppler_LIBS ${poppler_LIBS} ${NSS3_LIBRARIES}) + if(${CMAKE_VERSION} VERSION_LESS "3.6.0") + set(poppler_LIBS ${poppler_LIBS} ${NSS3_LIBRARIES}) + else() + set(poppler_LIBS ${poppler_LIBS} PkgConfig::NSS3) + endif() endif() if (OpenJPEG_FOUND) set(poppler_SRCS ${poppler_SRCS} diff --git a/cmake/modules/FindGLIB.cmake b/cmake/modules/FindGLIB.cmake index a7d43fa6..68efd347 100644 --- a/cmake/modules/FindGLIB.cmake +++ b/cmake/modules/FindGLIB.cmake @@ -15,6 +15,10 @@ include(FindPackageHandleStandardArgs) find_package(PkgConfig REQUIRED) -pkg_check_modules(GLIB2 "glib-2.0>=${GLIB_REQUIRED}" "gobject-2.0>=${GLIB_REQUIRED}" "gio-2.0>=${GLIB_REQUIRED}") +if(${CMAKE_VERSION} VERSION_LESS "3.6.0") + pkg_check_modules(GLIB2 "glib-2.0>=${GLIB_REQUIRED}" "gobject-2.0>=${GLIB_REQUIRED}" "gio-2.0>=${GLIB_REQUIRED}") +else() + pkg_check_modules(GLIB2 IMPORTED_TARGET "glib-2.0>=${GLIB_REQUIRED}" "gobject-2.0>=${GLIB_REQUIRED}" "gio-2.0>=${GLIB_REQUIRED}") +endif() find_package_handle_standard_args(GLib DEFAULT_MSG GLIB2_LIBRARIES GLIB2_CFLAGS) diff --git a/cmake/modules/FindNSS3.cmake b/cmake/modules/FindNSS3.cmake index 13876290..6b47be4c 100644 --- a/cmake/modules/FindNSS3.cmake +++ b/cmake/modules/FindNSS3.cmake @@ -15,7 +15,11 @@ include(FindPackageHandleStandardArgs) if (NOT MSVC) find_package(PkgConfig REQUIRED) - pkg_check_modules(NSS3 "nss>=3.19") + if(${CMAKE_VERSION} VERSION_LESS "3.6.0") + pkg_check_modules(NSS3 "nss>=3.19") + else () + pkg_check_modules(NSS3 IMPORTED_TARGET "nss>=3.19") + endif() find_package_handle_standard_args(NSS3 DEFAULT_MSG NSS3_LIBRARIES NSS3_CFLAGS) diff --git a/glib/CMakeLists.txt b/glib/CMakeLists.txt index e6acccee..6f91669d 100644 --- a/glib/CMakeLists.txt +++ b/glib/CMakeLists.txt @@ -94,7 +94,11 @@ if(MINGW AND BUILD_SHARED_LIBS) get_target_property(POPPLER_GLIB_SOVERSION poppler-glib SOVERSION) set_target_properties(poppler-glib PROPERTIES SUFFIX "-${POPPLER_GLIB_SOVERSION}${CMAKE_SHARED_LIBRARY_SUFFIX}") endif() -target_link_libraries(poppler-glib poppler ${GLIB2_LIBRARIES} ${CAIRO_LIBRARIES} ${FREETYPE_LIBRARIES}) +if(${CMAKE_VERSION} VERSION_LESS "3.6.0") + target_link_libraries(poppler-glib poppler ${GLIB2_LIBRARIES} ${CAIRO_LIBRARIES} ${FREETYPE_LIBRARIES}) +else() + target_link_libraries(poppler-glib poppler PkgConfig::GLIB2 ${CAIRO_LIBRARIES} ${FREETYPE_LIBRARIES}) +endif() if(CMAKE_USE_PTHREADS_INIT) target_link_libraries(poppler-glib Threads::Threads) endif() _______________________________________________ poppler mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/poppler
