File: linux_i386.cmake

package info (click to toggle)
swi-prolog 8.2.4%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 78,084 kB
  • sloc: ansic: 362,656; perl: 322,276; java: 5,451; cpp: 4,625; sh: 3,047; ruby: 1,594; javascript: 1,509; yacc: 845; xml: 317; makefile: 156; sed: 12; sql: 6
file content (37 lines) | stat: -rw-r--r-- 1,181 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# This is supposed to be a TOOLCHAIN file for compiling a 32-bit version
# on 64-bit Linux, but that doesn't work  somehow. The work around is to
# configure using
#
#     cmake -DSWIPL_M32=ON ...
#
# Note that all packages, gcc and g++ need to be installed for i386,
# e.g.
#
#     apt install gcc-multilib g++-multilib

# apt install \
#	libarchive-dev:i386 libc6-dev:i386 libc6-dev-i386 \
#	libdb-dev:i386 libedit-dev:i386 libgmp-dev:i386 \
#	libice-dev:i386 libjpeg-dev:i386 libjpeg8-dev:i386 \
#	libncurses5-dev:i386 libossp-uuid-dev:i386 \
#	libpcre3-dev:i386 libssl1.0-dev:i386 \
#	libstdc++-7-dev:i386 libxext-dev:i386 libxft-dev:i386 \
#	libxinerama-dev:i386 libxpm-dev:i386 libxt-dev:i386 \
#	libyaml-dev:i386 zlib1g-dev:i386

# the name of the target operating system (if TOOLCHAIN works)
# set(CMAKE_SYSTEM_NAME Linux)

# Tell gcc and g++ to generate i386 binaries
set(CMAKE_C_FLAGS -m32)
set(CMAKE_CXX_FLAGS -m32)

# Get this right
set(CMAKE_SIZEOF_VOID_P 4)

# Search in /usr/lib/i386-linux-gnu for the multi archive
# libraries
set(CMAKE_LIBRARY_ARCHITECTURE i386-linux-gnu)

# Make pkg-config search in /usr/lib/i386-linux-gnu/pkgconfig
set(CMAKE_PREFIX_PATH /usr)