diff options
author | Ray Molenkamp <github@lazydodo.com> | 2020-09-15 22:16:37 +0300 |
---|---|---|
committer | Ray Molenkamp <github@lazydodo.com> | 2020-09-15 22:16:37 +0300 |
commit | 2eec6ec793386cef522193f69e2790a4bd301391 (patch) | |
tree | d08ad928130ffbb80102ae8747c52dc974b99020 /build_files/cmake/platform | |
parent | 7b3d38a72d367e155ad3c417882fa3dfcff2fcb9 (diff) |
Deps: Add potrace as a new library dependency
For work the GP team plans to land soon (T79877) potrace was taken
on as an additional optional dependency.
This diff adds building the library to the deps builder and takes
care of the integration into the build-system with the `WITH_POTRACE`
cmake switch.
Differential Revision: https://developer.blender.org/D8662
Reviewed by: brecht, sergey
Diffstat (limited to 'build_files/cmake/platform')
-rw-r--r-- | build_files/cmake/platform/platform_unix.cmake | 8 | ||||
-rw-r--r-- | build_files/cmake/platform/platform_win32.cmake | 7 |
2 files changed, 15 insertions, 0 deletions
diff --git a/build_files/cmake/platform/platform_unix.cmake b/build_files/cmake/platform/platform_unix.cmake index b2105a58a0a..bf611f56ce1 100644 --- a/build_files/cmake/platform/platform_unix.cmake +++ b/build_files/cmake/platform/platform_unix.cmake @@ -459,6 +459,14 @@ if(WITH_GMP) endif() endif() +if(WITH_POTRACE) + find_package_wrapper(Potrace) + if(NOT POTRACE_FOUND) + message(WARNING "potrace not found, disabling WITH_POTRACE") + set(WITH_POTRACE OFF) + endif() +endif() + if(EXISTS ${LIBDIR}) without_system_libs_end() endif() diff --git a/build_files/cmake/platform/platform_win32.cmake b/build_files/cmake/platform/platform_win32.cmake index 64e4b276610..d49b576ba1a 100644 --- a/build_files/cmake/platform/platform_win32.cmake +++ b/build_files/cmake/platform/platform_win32.cmake @@ -760,3 +760,10 @@ if(WITH_GMP) set(GMP_ROOT_DIR ${LIBDIR}/gmp) set(GMP_FOUND On) endif() + +if(WITH_POTRACE) + set(POTRACE_INCLUDE_DIRS ${LIBDIR}/potrace/include) + set(POTRACE_LIBRARIES ${LIBDIR}/potrace/lib/potrace.lib) + set(POTRACE_FOUND On) +endif() + |