Decision: https://lists.blender.org/pipermail/bf-committers/2020-December/050836.html
Adds CMake dependency builder support. Tested on
Windows and macOS. (Thanks @Ray Molenkamp (LazyDodo))
Ref T84836
Details
- Reviewers
Ray Molenkamp (LazyDodo) Sebastián Barschkis (sebbas) - Group Reviewers
Platform: macOS - Maniphest Tasks
- T84836: Dependency: Libharu, for GPencil.
T83190: GPencil: Import/Export main task - Commits
- rB59054d906fa9: CMake/Windows/macOS: Add Libharu
Diff Detail
- Repository
- rB Blender
- Branch
- lib (branched from master)
- Build Status
Buildable 11885 Build 11885: arc lint + arc unit
Event Timeline
| 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 |
That's all I have Hmm it builds both shared and static libs. Only static is harvested. | |
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 ()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...." | |
| build_files/cmake/platform/platform_win32.cmake | ||
|---|---|---|
| 805 ↗ | (On Diff #32349) | Indent seems wider than usual |
@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?
Actually yes, that is a problem, i have forgotten, my bad i'll do some more extensive testing/changes on this diff
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
