When I run FindPackage(PythonLibs), it first finds the python static library, python3.5m.a, not python3.5m.so. Is this the expected behavior of CMake? I suspect this is not like a CMake error report ; however, this bug report was submitted in 2005. Things have been changing for over 13 years. If shared libraries have a preference, then any idea why CMake will find a static library through a shared one?
I already fixed the build problem by simply telling CMake where the appropriate library is for my own build using the command SET(). I am looking for an answer that leads to a better understanding of CMake's behavior in this context, because I try to solve another problem and find the static text over the shared library seemed strange to me. Thank!
System / Problem Information:
- Ubuntu 16.04, 64 bit
- Compiled Python 3.5.5 with sharing enabled
- CMake 3.11.0
- Change as per Tsyvarev’s comment: shared and static libraries are in the same directory
If you look at cmake files, in particular FindPythonLibs.cmake (CMake 3.11.0), on lines 142-163, it seems to me that it finds a shared library and then static, but again I am not an expert in CMake (this is CMake noob trying to determine what the source code does with very little context).
Thanks for taking the time from your day to read this question. Any help is appreciated.
Edit: 4/13/18
Well, that is interesting. I checked the CMAKE_FIND_LIBRARY_SUFFIXES variable and the value was: ".so.a". It almost gets interesting enough for me to figure out how to debug CMake files according to this question. When / If I get around, I will update my post again.
Edit 4/16/18
, . , . CMakeCache.txt, python 3.5.5, FIND_PACKAGE . , , . - .