-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[libharu,wt] Update libharu to 2.4.2 and Wt to 4.8.1 (#26945)
* [libharu] Update to 2.4.2 I updated the patches for libharu so they apply to 2.4.2 properly. The target name changed from haru to hpdf, the haru imported library is included for backwards compatibility. I added a usage file that only mentions hpdf. I added a patch for VTK so that it compiles with libharu 2.4.x, since the type of one the HPDF_Page_SetDash arguments changed from HPDF_UINT16 to HPDF_REAL. POCO also has an optional libharu dependency when the 'pdf' feature is enabled, but at the moment the PocoPDF library doesn't seem to be built even when enabled. * [wt] Update to 4.8.1 This release fixes compatibility with libharu 2.4.x
- Loading branch information
1 parent
fc5a7c6
commit 65521f7
Showing
16 changed files
with
96 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,32 @@ | ||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt | ||
index 4ca0f14..02ad1ab 100644 | ||
index b87af66..10ec58f 100644 | ||
--- a/src/CMakeLists.txt | ||
+++ b/src/CMakeLists.txt | ||
@@ -87,9 +87,23 @@ if(UNIX AND NOT APPLE) | ||
target_link_libraries (haru ${M_LIB}) | ||
@@ -87,9 +87,26 @@ if(UNIX AND NOT APPLE) | ||
target_link_libraries (hpdf ${M_LIB}) | ||
endif() | ||
|
||
+if(LIBHPDF_SHARED) | ||
+ if(WIN32 AND NOT CYGWIN) | ||
+ set_target_properties(haru PROPERTIES DEFINE_SYMBOL HPDF_DLL_MAKE) | ||
+ endif(WIN32 AND NOT CYGWIN) | ||
+endif(LIBHPDF_SHARED) | ||
+ if(WIN32 AND NOT CYGWIN) | ||
+ set_target_properties(hpdf PROPERTIES DEFINE_SYMBOL HPDF_DLL_MAKE) | ||
+ endif() | ||
+endif() | ||
+ | ||
+target_include_directories(haru PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> $<INSTALL_INTERFACE:include>) | ||
+target_include_directories(hpdf PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> $<INSTALL_INTERFACE:include>) | ||
+ | ||
+add_library(haru INTERFACE) | ||
+set_property(TARGET haru APPEND PROPERTY INTERFACE_LINK_LIBRARIES hpdf) | ||
+ | ||
install( | ||
- TARGETS | ||
+ TARGETS haru | ||
- TARGETS hpdf | ||
+ TARGETS hpdf haru | ||
+ EXPORT unofficial-libharu-config | ||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} | ||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} | ||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} | ||
) | ||
+ | ||
+install(EXPORT unofficial-libharu-config | ||
+ NAMESPACE unofficial::libharu:: | ||
+ DESTINATION share/unofficial-libharu | ||
+ NAMESPACE unofficial::libharu:: | ||
+ DESTINATION share/unofficial-libharu | ||
+) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index 14ed67d..57673c1 100644 | ||
index 1c75e5a..9a6c575 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -126,7 +126,7 @@ set( | ||
@@ -148,7 +148,7 @@ set( | ||
) | ||
|
||
# install header files | ||
-install(FILES ${haru_HDRS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) | ||
+install(FILES ${haru_HDRS} DESTINATION include/) | ||
|
||
# install various files | ||
install(FILES README.md CHANGES INSTALL DESTINATION .) | ||
install(FILES README.md CHANGES INSTALL DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/libharu) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
libharu provides CMake targets: | ||
|
||
find_package(unofficial-libharu CONFIG REQUIRED) | ||
target_link_libraries(main PRIVATE unofficial::libharu::hpdf) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
diff --git a/IO/ExportPDF/vtkPDFContextDevice2D.cxx b/IO/ExportPDF/vtkPDFContextDevice2D.cxx | ||
index a51945dc9b..1cbc3945af 100644 | ||
--- a/IO/ExportPDF/vtkPDFContextDevice2D.cxx | ||
+++ b/IO/ExportPDF/vtkPDFContextDevice2D.cxx | ||
@@ -1631,21 +1631,21 @@ void vtkPDFContextDevice2D::ApplyLineWidth(float width) | ||
void vtkPDFContextDevice2D::ApplyLineType(int type) | ||
{ | ||
// These match the OpenGL2 implementation: | ||
- static const HPDF_UINT16 noPen[] = { 0, 10 }; | ||
+ static const HPDF_REAL noPen[] = { 0, 10 }; | ||
static const HPDF_UINT noPenLen = 2; | ||
|
||
- static const HPDF_UINT16 dash[] = { 8 }; | ||
+ static const HPDF_REAL dash[] = { 8 }; | ||
static const HPDF_UINT dashLen = 1; | ||
|
||
- static const HPDF_UINT16 dot[] = { 1, 7 }; | ||
- static const HPDF_UINT16 denseDot[] = { 1, 3 }; | ||
+ static const HPDF_REAL dot[] = { 1, 7 }; | ||
+ static const HPDF_REAL denseDot[] = { 1, 3 }; | ||
static const HPDF_UINT dotLen = 2; | ||
|
||
- static const HPDF_UINT16 dashDot[] = { 4, 6, 2, 4 }; | ||
+ static const HPDF_REAL dashDot[] = { 4, 6, 2, 4 }; | ||
static const HPDF_UINT dashDotLen = 4; | ||
|
||
// This is dash-dot-dash, but eh. It matches the OpenGL2 0x1C47 pattern. | ||
- static const HPDF_UINT16 dashDotDot[] = { 3, 3, 1, 3, 3, 3 }; | ||
+ static const HPDF_REAL dashDotDot[] = { 3, 3, 1, 3, 3, 3 }; | ||
static const HPDF_UINT dashDotDotLen = 6; | ||
|
||
switch (type) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,31 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index 5012cfd1b..95f812685 100644 | ||
index 7fe932fb7..ae122f03a 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -338,7 +338,7 @@ ELSE (CMAKE_MAJOR_VERSION EQUAL 2 AND CMAKE_MINOR_VERSION LESS 8) | ||
ENDIF (CMAKE_MAJOR_VERSION EQUAL 2 AND CMAKE_MINOR_VERSION LESS 8) | ||
@@ -342,9 +342,9 @@ SET(WT_WRASTERIMAGE_IMPLEMENTATION ${WT_WRASTERIMAGE_DEFAULT_IMPLEMENTATION} CAC | ||
SET_PROPERTY(CACHE WT_WRASTERIMAGE_IMPLEMENTATION PROPERTY STRINGS GraphicsMagick Direct2D none) | ||
|
||
IF (${WT_WRASTERIMAGE_IMPLEMENTATION} STREQUAL "GraphicsMagick") | ||
- IF (NOT GM_FOUND) | ||
+ IF (0) | ||
MESSAGE(FATAL_ERROR "WT_WRASTERIMAGE_IMPLEMENTATION set to GraphicsMagick but GM is not found. Indicate the location of your graphicsmagick library using -DGM_PREFIX=...") | ||
ENDIF (NOT GM_FOUND) | ||
- ENDIF (NOT GM_FOUND) | ||
+ ENDIF () | ||
SET(WT_HAS_WRASTERIMAGE true) | ||
ELSEIF (${WT_WRASTERIMAGE_IMPLEMENTATION} STREQUAL "Direct2D") | ||
IF (WIN32) | ||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt | ||
index 78d82ee53..01ac5f42a 100644 | ||
index fb398ff0d..16b5f76b3 100644 | ||
--- a/src/CMakeLists.txt | ||
+++ b/src/CMakeLists.txt | ||
@@ -595,8 +595,9 @@ ELSE(HAVE_HARU) | ||
@@ -632,8 +632,8 @@ ELSE(HAVE_HARU) | ||
ENDIF(HAVE_HARU) | ||
|
||
IF("${WT_WRASTERIMAGE_IMPLEMENTATION}" STREQUAL "GraphicsMagick") | ||
- TARGET_LINK_LIBRARIES(wt PRIVATE ${GM_LIBRARIES}) | ||
- INCLUDE_DIRECTORIES(${GM_INCLUDE_DIRS}) | ||
+ find_package(unofficial-graphicsmagick REQUIRED) | ||
+ TARGET_LINK_LIBRARIES(wt PRIVATE unofficial::graphicsmagick::graphicsmagick) | ||
+ # INCLUDE_DIRECTORIES(${GM_INCLUDE_DIRS}) | ||
ADD_DEFINITIONS(-DHAVE_GRAPHICSMAGICK) | ||
ELSEIF("${WT_WRASTERIMAGE_IMPLEMENTATION}" STREQUAL "skia") | ||
TARGET_LINK_LIBRARIES(wt PRIVATE ${SKIA_LIBRARIES}) | ||
ELSEIF("${WT_WRASTERIMAGE_IMPLEMENTATION}" STREQUAL "Direct2D") | ||
TARGET_LINK_LIBRARIES(wt PRIVATE d2d1 dwrite windowscodecs shlwapi) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters