georgmartius / vid.stab

Video stabilization library
http://public.hronopik.de/vid.stab/
Other
843 stars 108 forks source link

missing OMP dependencies for pkg-config file #29

Closed barsnick closed 9 years ago

barsnick commented 9 years ago

Recently (commit 5970467dec224668ee755b649644ec55ddac6374) use of OpenMP was added. For applications using libvidstab, this introduces a new dependency to libgomp. Yet the pkgconfig file created by vid.stab's CMakeModules/create_pkgconfig_file.cmake doesn't provide "-lgomp".

(My ffmpeg failed to configure due to this - it was missing the omp_* symbols provided by libgomp.)

I haven't found a way to expand CMake's "target_link_libraries(vidstab gomp)" into a variable for use in this line: Libs: -L\${libdir} -l${name} but it probably can be done with some CMake variable and some foreach logic. I gave up after about half an hour. ;-) (I'm looking for magic expansion because the dependency depends on USE_OMP.)

This site takes a slightly different approach with a template and variable replacements: http://www.kaizou.org/2014/11/typical-cmake-project/ (as does the x265 project), but there isn't much difference to vid.stab's approach. And the suggested variable:

SET(PKG_CONFIG_LIBS "-L\${libdir} -lmylib" ) still needs said foreach magic.