Re: [CMake] cmake 3.12 - python libs / 32 / 64 bits

2018-11-16 Thread Marc CHEVRIER
FYI, I just deliver a MR ( https://gitlab.kitware.com/cmake/cmake/merge_requests/2624) which fix the problem of the selection of the library with the wrong architecture. Le jeu. 15 nov. 2018 à 10:00, Eric Noulard a écrit : > Le jeu. 15 nov. 2018 à 09:47, Stéphane Ancelot > a écrit : > >> I

Re: [CMake] cmake 3.12 - python libs / 32 / 64 bits

2018-11-15 Thread Eric Noulard
Le jeu. 15 nov. 2018 à 09:47, Stéphane Ancelot a écrit : > I agree. That was a debug snippet...but is wrong ... I setted up again the > toolchain, but does not help. > If you are using a proper toolchain for 32bit compilation. It looks like a bug in the find_package for Python in the

Re: [CMake] cmake 3.12 - python libs / 32 / 64 bits

2018-11-15 Thread Stéphane Ancelot
I agree. That was a debug snippet...but is wrong ... I setted up again the toolchain, but does not help.  So, I know where are include_dirs and libs  for 32 bits cross compiling, I have to hardcode it like this ?  add_library(python SHARED IMPORTED)  set_target_properties( python PROPERTIES

Re: [CMake] cmake 3.12 - python libs / 32 / 64 bits

2018-11-14 Thread Marc CHEVRIER
The way you proceed is wrong. The system configuration is determined during the 'project' function call. Setting information after this call is useless. So, in your example, on a 64bit system, the compilation configuration will be 64bit (variable CMAKE_SIZEOF_VOID_P has value 8). This explain why

[CMake] cmake 3.12 - python libs / 32 / 64 bits

2018-11-14 Thread Stéphane Ancelot
Hi, My system is 64 bits but I can cross compile python c modules for 32 bits . Unfortunately I don't manage to retrieve python 32 libs , always the 64 bits version is found. here is what I tried : cmake_minimum_required(VERSION 3.10) project(py_autom) set(CMAKE_SYSTEM_PROCESSOR "i686")