Skip to content
Snippets Groups Projects
Commit e43f4023 authored by Ben Boeckel's avatar Ben Boeckel
Browse files

libharu: update to the new module system

parent 56e0b4f7
No related branches found
No related tags found
No related merge requests found
include(CMakeDependentOption)
vtk_module_third_party(
INTERNAL
LICENSE_FILES "vtklibharu/LICENCE"
VERSION "2.4.0"
STANDARD_INCLUDE_DIRS
EXTERNAL
PACKAGE LibHaru
# Unreleased. Requires these PRs:
# https://github.com/libharu/libharu/pull/157
# https://github.com/libharu/libharu/pull/187
VERSION 2.4.0
TARGETS LibHaru::LibHaru
STANDARD_INCLUDE_DIRS)
cmake_dependent_option(VTK_MODULE_vtklibharu_IS_SHARED "Whether the system libharu in use is a shared library or not" ON
VTK_USE_SYSTEM_LIBHARU "${BUILD_SHARED_LIBS}")
include(vtkDetectLibraryType)
vtk_detect_library_shared(vtklibharu LibHaru::LibHaru)
if (WIN32 AND VTK_MODULE_vtklibharu_IS_SHARED)
set(HPDF_DLL 0)
if (WIN32 AND vtklibharu_is_shared)
set(HPDF_DLL 1)
endif()
endif ()
vtk_module_third_party(LibHaru
INCLUDE_DIRS
"${CMAKE_CURRENT_SOURCE_DIR}/vtklibharu/include"
"${CMAKE_CURRENT_BINARY_DIR}/vtklibharu/include"
)
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/vtk_libharu.h.in"
"${CMAKE_CURRENT_BINARY_DIR}/vtk_libharu.h")
vtk_module_install_headers(
FILES "${CMAKE_CURRENT_BINARY_DIR}/vtk_libharu.h")
vtk_module(vtklibharu
EXCLUDE_FROM_WRAPPING
DEPENDS
vtkpng
vtkzlib
)
......@@ -8,7 +8,7 @@ readonly name="libharu"
readonly ownership="Libharu Upstream <kwrobot@kitware.com>"
readonly subtree="ThirdParty/$name/vtk$name"
readonly repo="https://gitlab.kitware.com/third-party/libharu.git"
readonly tag="for/vtk-old"
readonly tag="for/vtk-20181101-2.4.0-gd84867e"
readonly paths="
.gitattributes
CMakeLists.txt
......
NAME
VTK::libharu
LIBRARY_NAME
vtklibharu
PRIVATE_DEPENDS
VTK::png
VTK::zlib
THIRD_PARTY
......@@ -16,11 +16,11 @@
#define vtk_libharu_h
/* Use the libharu library configured for VTK. */
#cmakedefine VTK_USE_SYSTEM_LIBHARU
#cmakedefine01 VTK_MODULE_USE_EXTERNAL_vtklibharu
#cmakedefine HPDF_DLL
#ifdef VTK_USE_SYSTEM_LIBHARU
#if VTK_MODULE_USE_EXTERNAL_vtklibharu
# include <hpdf.h>
#else
# include <vtklibharu/include/hpdf.h>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment