Commit 8076bc66 authored by Albert Astals Cid's avatar Albert Astals Cid

Fix link in FreeBSD

parent 900d02b0
......@@ -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:
......
......@@ -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}
......
......@@ -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)
......@@ -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)
......
......@@ -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()
......
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