Blame cmake/Toolchain-cross-m32.cmake

Packit Service 31306d
set(CMAKE_C_FLAGS "-m32" CACHE STRING "C compiler flags"   FORCE)
Packit Service 31306d
set(CMAKE_CXX_FLAGS "-m32" CACHE STRING "C++ compiler flags" FORCE)
Packit Service 31306d
Packit Service 31306d
set(LIB32 /usr/lib) # Fedora
Packit Service 31306d
Packit Service 31306d
if(EXISTS /usr/lib32)
Packit Service 31306d
    set(LIB32 /usr/lib32) # Arch, Solus
Packit Service 31306d
endif()
Packit Service 31306d
Packit Service 31306d
set(CMAKE_SYSTEM_LIBRARY_PATH ${LIB32} CACHE STRING "system library search path" FORCE)
Packit Service 31306d
set(CMAKE_LIBRARY_PATH        ${LIB32} CACHE STRING "library search path"        FORCE)
Packit Service 31306d
Packit Service 31306d
# this is probably unlikely to be needed, but just in case
Packit Service 31306d
set(CMAKE_EXE_LINKER_FLAGS    "-m32 -L${LIB32}" CACHE STRING "executable linker flags"     FORCE)
Packit Service 31306d
set(CMAKE_SHARED_LINKER_FLAGS "-m32 -L${LIB32}" CACHE STRING "shared library linker flags" FORCE)
Packit Service 31306d
set(CMAKE_MODULE_LINKER_FLAGS "-m32 -L${LIB32}" CACHE STRING "module linker flags"         FORCE)
Packit Service 31306d
Packit Service 31306d
# on Fedora and Arch and similar, point pkgconfig at 32 bit .pc files. We have
Packit Service 31306d
# to include the regular system .pc files as well (at the end), because some
Packit Service 31306d
# are not always present in the 32 bit directory
Packit Service 31306d
if(EXISTS ${LIB32}/pkgconfig)
Packit Service 31306d
    set(ENV{PKG_CONFIG_LIBDIR} ${LIB32}/pkgconfig:/usr/share/pkgconfig:/usr/lib/pkgconfig:/usr/lib64/pkgconfig)
Packit Service 31306d
endiF()