I'm trying to build a complicated package for 32-bits on 64-bit Ubuntu.
I got very far using

    set(CMAKE_C_FLAGS -m32)
    set(CMAKE_LIBRARY_ARCHITECTURE i386-linux-gnu)

But right now, find_package(OpenSSL) is failing.  I think the problem is
with FindOpenSSL.cmake doing this (Ubuntu 18.04, CMake 3.10):

    if (UNIX)
      find_package(PkgConfig QUIET)
      pkg_check_modules(_OPENSSL QUIET openssl)
    endif ()

Ubuntu has, I think compatibe with the Linux standard, these .pc files
for the multilib installed OpenSSL:

    $ dpkg -L libssl1.0-dev | grep openssl.pc
    $ dpkg -L libssl1.0-dev:i386 | grep openssl.pc

Should CMake not use CMAKE_LIBRARY_ARCHITECTURE?  Is there some neat work
around?  Best I can now think of is to create a script pkg-config.i386,
make that set the proper search path and tell CMake to use this script :(

    Thanks --- Jan


Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 

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 

Follow this link to subscribe/unsubscribe:

Reply via email to