[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
to
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
set(ZLIB_LIBPATH ${ZLIB}/lib)
as there is the same problem - while nowhere else ZLIB_LIBPATH is
mentioned - but it works,
now making
set(ZZLIB_LIBPATH ${ZLIB}/lib)
would make nothing.
so where these definitions are enacted, so that
libraries and library paths are added?
as
link_directories CMake directive is not used
and these libraries seems are not added to
BLENDER_SORTED_LIBS
which go to
target_link_libraries(blender ${BLENDER_SORTED_LIBS} )
?
Regards
Sergey
More information about the Bf-committers
mailing list