Page MenuHome

CMake/Windows/macOS: Libharu
ClosedPublic

Authored by Ankit Meel (ankitm) on Dec 23 2020, 5:49 PM.

Diff Detail

Repository
rB Blender
Branch
arcpatch-D9928_1 (branched from master)
Build Status
Buildable 11929
Build 11929: arc lint + arc unit

Event Timeline

Ankit Meel (ankitm) requested review of this revision.Dec 23 2020, 5:49 PM
Ankit Meel (ankitm) created this revision.
Ankit Meel (ankitm) edited the summary of this revision. (Show Details)Dec 23 2020, 5:52 PM
  • remove unused version
build_files/build_environment/cmake/haru.cmake
22

why just apple?

also does this actually work? BUILD_SHARED_LIBS should only work for libraries that do not specify the library type in the add_library call, haru has explicit shared/static options where they manages this themselves LIBHPDF_SHARED / LIBHPDF_SHARED

build_files/build_environment/cmake/haru.cmake
22

why just apple?

That's all I have

Hmm it builds both shared and static libs. Only static is harvested.
I'll remove this option.

i recommend building with

-DLIBHPDF_SHARED=Off 
-DLIBHPDF_STATIC=On
-LIBHPDF_EXAMPLES=Off

for all platforms, some of these are default, but I like being explicit with our expectations, plus defaults sometimes change better get ahead of that.

Comments on this ? @Antonio Vazquez (antoniov) is the exporter in C++ ?

# Enable exceptions on linux if required
# (eg if you are using libharu in a C++ environment,
# and you want your error-callback to throw an exception,
# you will need to enable this for the exception to be
# able to throw through the libharu callstack).
if (CMAKE_COMPILER_IS_GNUCC OR ("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang"))
   option (LIBHPDF_ENABLE_EXCEPTIONS "Enable exceptions" NO)
   if (LIBHPDF_ENABLE_EXCEPTIONS)
      set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fexceptions")
   endif (LIBHPDF_ENABLE_EXCEPTIONS)
endif ()

Yes, all exporters are C++

  • set shared/static/exceptions/examples. Cleanup.

Comments on this ? @Antonio Vazquez (antoniov) is the exporter in C++ ?

You really asked the wrong question there, the question is not is the exporter c++, but "is the exporter using the error callback and throwing exceptions from it?"

CMakeLists.txt
208

Please follow the naming scheme above, "enable features relying on...."

  • expand on help

Comments on this ? @Antonio Vazquez (antoniov) is the exporter in C++ ?

You really asked the wrong question there, the question is not is the exporter c++, but "is the exporter using the error callback and throwing exceptions from it?"

Just trying to be future proof (;

Ankit Meel (ankitm) marked 2 inline comments as done.Dec 26 2020, 7:43 AM
build_files/cmake/platform/platform_win32.cmake
805

Indent seems wider than usual

Ankit Meel (ankitm) edited the summary of this revision. (Show Details)Jan 4 2021, 1:53 PM
Ankit Meel (ankitm) edited the summary of this revision. (Show Details)
  • Cleanup indent etc.
Ankit Meel (ankitm) retitled this revision from Dependencies: libharu to CMake/Windows/macOS: Libharu .Jan 18 2021, 8:21 PM
Ankit Meel (ankitm) edited the summary of this revision. (Show Details)
Ray Molenkamp (LazyDodo) accepted this revision.EditedJan 18 2021, 8:31 PM

lgtm(given you cleanup my formatting booboo)

This revision is now accepted and ready to land.Jan 18 2021, 8:31 PM

@LazyDodoI have a doubt about this. When I installed the lib in my PC and used it, I remember you adviced me to comment a line to avoid a compilation problem. This is the line. What I did was comment this line and recompile the lib.

Do we need this fix?

Ray Molenkamp (LazyDodo) requested changes to this revision.Jan 18 2021, 9:16 PM

Actually yes, that is a problem, i have forgotten, my bad i'll do some more extensive testing/changes on this diff

This revision now requires changes to proceed.Jan 18 2021, 9:16 PM
Ankit Meel (ankitm) retitled this revision from CMake/Windows/macOS: Libharu to CMake/Windows/macOS: Libharu.
Ankit Meel (ankitm) edited the summary of this revision. (Show Details)
  • Add patch to fix libtiff linker issue.
This revision is now accepted and ready to land.Jan 26 2021, 4:09 PM
  • Turn off haru if TIFF is disabled.
This revision was automatically updated to reflect the committed changes.

Seems someone forgot to ping @Sybren A. Stüvel (sybren) as the Linux maintainer?

Note that in this state no grease pencil code using libharu should be committed, since it will fail to build on Linux.

Seems someone forgot to ping @Sybren A. Stüvel (sybren) as the Linux maintainer?

Note that in this state no grease pencil code using libharu should be committed, since it will fail to build on Linux.

Didn't see [libharu dependent code committed to master early] coming.

Windows support was added by Ray while helping me improve the patch. I wanted to avoid blocking the diff by all platforms (T80830#1021031) but having the default for WITH_HARU as ON doesn't help that.
Correction: D10280: CMake/Linux: Add libharu to platform_linux.cmake