[Bf-committers] CMake question - adding a library in Blender CMakeLists.txt

Sergey Kurdakov sergey.forum at gmail.com
Wed Feb 9 21:02:32 CET 2011

Hi developers,

while of cause it is possible to become master of general CMake,
still existing CMakeLists.txt s are done specifically for building Blender.

Now my  task:
I'd like to link Blender with external lib ( I do it on windows
(win64) if it is important).

I see  an example for jpeg library:

set(JPEG_LIBRARIES libjpeg)

if I comment the line - jpeg won't appear, OK
but if I rename a line
set(JJPEG_LIBRARIES libjpeg)

I again won't get a library in project.

still there are no any JPEG_LIBRARIES being used anywhere in other txt files.

so question is - how lib is actually added after being set a value?

if to extend question to libpaths then - where LIBPATH s are added such as


as there is the same problem - while nowhere else ZLIB_LIBPATH is
mentioned - but it works,

now  making

would make nothing.

so where these definitions are enacted, so that
libraries and library paths are added?

link_directories CMake directive is  not used
and these libraries seems are not added to
which go to

target_link_libraries(blender ${BLENDER_SORTED_LIBS} )



More information about the Bf-committers mailing list