find_library/cross-compile: does not find libs without filename extension
Hi there, I am cross compiling from Windows to QNX with qcc (modified GCC compiler) and CMake (>= 3.11.0). The compiled code depends on Boost. Additionally I am using Conan (https://conan.io) as dependency manager that generates a Findboost.cmake file to utilize find_library(boost ...). The generated Find-file does specify the boost libraries by their plain names (e.g. boost_system, boost_chrono, ...).
problem
When I build from Windows for Windows (native build; Visual Studio compiler "VS2015") then the real library filename is "boost_system.lib". find_library finds the files, this works as expected.
When I build from Windows for QNX (cross build; qcc) then the real library filename is "boost_system.so". find_library does not find the files.
investigation
The calling code looks like this (copy-paste):
find_package (boost 1.67.0 REQUIRED COMPONENTS system thread date_time chrono atomic log filesystem)
This results in console output
-- Library boost_system not found in package, might be system one .
The line can be found at Findboost.cmake line 38 (see attachment).
While compiling for QNX I have checked the CMAKE_FIND_LIBRARY_SUFFIXES variable while building and it says ".so;.a" as expected. So in general find_library should find the requested library "boost_atomic".
To support the problem tracking I have attached the generated Find-file.
Best regards