blender/intern
Ankit Meel 1f6b7387ad CMake/macOS: Remove _LIBPATH, avoid link_directories.
After tests were bundled in a single executable and cycles and libmv
created their own tests, the warnings on macOS have gone over 800.
The reason is setting `*_LIBRARIES` to names of the libraries
and later using `link_directories` to link them properly.

https://cmake.org/cmake/help/latest/command/link_directories.html

> Note This command is rarely necessary and should be avoided where
> there are other choices. Prefer to pass full absolute paths to
> libraries where possible, since this ensures the correct library
> will always be linked. The find_library() command provides the
> full path, which can generally be used directly in calls to
> target_link_libraries().

Warnings like the following popup for every target/executable,
for every library it links to.
```
ld: warning: directory not found for option
'-L/Users/me/blender-build/blender/../lib/darwin/jpeg/lib/Debug'
```

The patch completes a step towards removing `link_directories` as
mentioned in TODO at several places.
The patch uses absolute paths to link libraries and removes
all `*_LIBPATH`s except `PYTHON_LIBPATH` from
`platform_apple.cmake` file. (The corner case where it's used seems
like dead code. Python is no longer shipped with that file structure.)

Also, unused code for LLVM-3.4 has been removed.
Also, guards to avoid searching libraries in system directories have
been added.

`APPLE` platform now no longer needs `setup_libdirs`,
`cycles_link_directories`, and `link_directories`.
The number of warnings now is less than 100, most of them being
deprecation ones in dependencies.

This patch depended on {rBb746179d0add}, {rB2fdbe4d05011},
{rB402a4cadba49} and {rBd7f482f88ecb}.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D8855
2020-10-09 19:41:58 +05:30
..
atomic Cleanup: make format after SortedIncludes change 2020-03-19 09:33:58 +01:00
audaspace Cleanup: make format after SortedIncludes change 2020-03-19 09:33:58 +01:00
clog Cleanup: spelling 2020-09-15 10:23:41 +10:00
cycles CMake/macOS: Remove _LIBPATH, avoid link_directories. 2020-10-09 19:41:58 +05:30
dualcon Cleanup: redundant parenthesis, NULL checks 2020-04-20 12:15:49 +10:00
eigen Cleanup: make format after SortedIncludes change 2020-03-19 09:33:58 +01:00
ffmpeg Tests: bundle tests for some modules in their own executables 2020-09-17 12:29:19 +02:00
ghost Cleanup: spelling 2020-10-09 12:12:29 +11:00
glew-mx Cleanup: GPUState: Remove stack from the state manager and rename it 2020-08-18 21:30:10 +02:00
guardedalloc Cleanup: avoid member access within null pointer 2020-10-01 14:49:44 +10:00
iksolver Cleanup: make format after SortedIncludes change 2020-03-19 09:33:58 +01:00
itasc Cleanup: typos & co in UI messages (and some other places). 2020-08-04 13:26:58 +02:00
libc_compat Build: add more libc compatibility functions for upcoming libraries update 2020-07-09 18:10:05 +02:00
libmv Fix critical lens distortion bug in libmv after rB3a7d62cd1f5e. 2020-10-05 11:47:32 +02:00
locale Cleanup: make format after SortedIncludes change 2020-03-19 09:33:58 +01:00
mantaflow Fluid: Fix particle helper grid export 2020-10-08 10:25:32 +02:00
memutil Cleanup: use C style doxygen comments 2020-09-12 16:33:34 +10:00
mikktspace Cleanup: make format after SortedIncludes change 2020-03-19 09:33:58 +01:00
numaapi Cleanup: use angle-brackets for email addresses 2020-09-30 12:05:56 +10:00
opencolorio Cleanup: consistent TODO/FIXME formatting for names 2020-09-19 14:34:32 +10:00
opensubdiv Subdivision Surfaces: add option disable using the limit surface 2020-09-30 16:39:02 +02:00
openvdb Cleanup: remove dead code in point cache and openvdb wrapper 2020-09-23 14:57:41 +02:00
quadriflow Quadriflow: Fix compilation error with C++17 2020-06-19 12:02:21 +02:00
rigidbody Fix missing "extern_bullet" library when building rigidbodies 2020-09-02 19:44:29 +02:00
sky Merge branch 'blender-v2.90-release' 2020-08-10 18:30:53 +02:00
utfconv Cleanup: make format after SortedIncludes change 2020-03-19 09:33:58 +01:00
CMakeLists.txt Tests: move remaining gtests into their own module folders 2020-08-10 18:14:00 +02:00