On 01/04/2017 05:12 PM, Christian Schmidbauer wrote: >> cmake ../src -DCMAKE_FIND_LIBRARY_CUSTOM_LIB_SUFFIX=x32 > > Currently, cmake tries to detect the naming scheme for > lib/lib32/lib64, hence making the life of a distribution with > non-standard library folders very hard. This patch should allow a > distribution to set the naming scheme of the lib<qual> folder to > whatever they want (allowed should be anything, see [1]). > > I don't have enough insight into cmake in order to say what would be > the "proper" way to achieve this. I went ahead and followed the logic > from Gentoo's portage (see [2] line 531-533) and tried to expand it > such that you can specify any string for <qual>.
I think their use of `LIB_SUFFIX` and my proposed variable named above are about the same except for the name. Currently your patch checks for a `FIND_LIBRARY_USE_CUSTOM_PATHS` global property and uses that to decide whether to check the `LIB_SUFFIX` variable. Instead I think it could just check for a single variable called `CMAKE_FIND_LIBRARY_CUSTOM_LIB_SUFFIX`, and if set use it instead of the default lib/lib32/lib64 for the current platform. That will allow users and distro packagers to build projects with the custom lib dir suffix. -Brad -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers