{"push_id":675023637,"size":4,"distinct_size":4,"ref":"refs/heads/test-contrib","head":"9a2cb3806993e300a879b6f4bd1baff412585d12","before":"f670273f959b523f5fb39754d63d7121388df611","commits":[{"sha":"671a630f47635ee8e44daf5ae6e94969ac4b8e0f","author":{"email":"fa84b044cd972a3040f6596903a3209d1974a1c1@gmail.com","name":"Samuel Martin"},"message":"cmake/OpenCVGenPkgconfig.cmake: rework opencv.pc generation\n\nUsing absolute path to locate the components in the \"Libs:\" field of the\n*.pc can badly break cross-compilation, especially when building\nstatically linked objects.\n\nIndeed, pkg-config automatically replaces the '-I...' and '-L...' paths\nwhen the PKG_CONFIG_SYSROOT_DIR and PKG_CONFIG_LIBDIR environment\nvariables are set [1]. This feature is very helpful and common in\ncross-compilation framework like Buildroot [2,3].\n\nWhen there are absolute paths in the *.pc files, pkg-config won't be\nable to do the path substitutions for these paths when the\naforementioned environment variables are set.\nIn such case, since the prefix is the target one, not the sysroot one,\nthese libraries' absolute paths will point to:\n- in the best case: a non-existing file (i.e. these files do not exists\n  on the host system;\n- at worst: the host system's libraries. This will make the linking\n  failed because these host system's libraries will most likely not be\n  build for the target architecture [4].\n\nSo, this patch replace the components' absolute paths by the form:\n  -L<libdir> -l<libname>\n\nThis way, the linker will be able to resolve each dependency path,\nwhatever the kind of objects/build (shared object or static build) it\nis dealing with.\n\nNote that for static link, the library order does matter [5]. The order\nof the opencv components has been carefully chosen to comply with this\nrequirement.\n\nFixes #3931\n\nThis patch is a port of [6] on the master branch.\n\n[1] http://linux.die.net/man/1/pkg-config\n[2] http://buildroot.org/\n[3] http://git.buildroot.net/buildroot/tree/package/pkgconf/pkg-config.in\n[4] http://autobuild.buildroot.net/results/e8a/e8a859276db34aff87ef181b0cce98916b0afc90/build-end.log\n[5] http://stackoverflow.com/questions/45135/linker-order-gcc\n[6] https://github.com/Itseez/opencv/commit/eceada586bbf18fc267e437522ec4f1f23ddc656\n\nSigned-off-by: Samuel Martin <s.martin49@gmail.com>","distinct":true,"url":"https://api.github.com/repos/MSOpenTech/opencv/commits/671a630f47635ee8e44daf5ae6e94969ac4b8e0f"},{"sha":"3863dc5b2b53028b9c7e70f2cdf8ef5d01c2b423","author":{"email":"df7bbd2e1b30f9cbe316b888d25da4f669e20ac7@itseez.com","name":"Maksim Shabunin"},"message":"Updated pkg-config generation, added sample makefile","distinct":true,"url":"https://api.github.com/repos/MSOpenTech/opencv/commits/3863dc5b2b53028b9c7e70f2cdf8ef5d01c2b423"},{"sha":"8fb37606f62fcb7564b1f304fd70f1c866e421af","author":{"email":"87b57388d14df1278545f685429c99b27c15f873@gmail.com","name":"Vadim Pisarevsky"},"message":"Merge pull request #4032 from mshabunin:fix-pkg-config","distinct":true,"url":"https://api.github.com/repos/MSOpenTech/opencv/commits/8fb37606f62fcb7564b1f304fd70f1c866e421af"},{"sha":"9a2cb3806993e300a879b6f4bd1baff412585d12","author":{"email":"8e04aaf2ce8cd50bc49e6666a96af0e4c6acadc7@akvelon.com","name":"Evgeny Agafonchikov"},"message":"Adding test support for WINRT","distinct":true,"url":"https://api.github.com/repos/MSOpenTech/opencv/commits/9a2cb3806993e300a879b6f4bd1baff412585d12"}]}