File: linux_i386.cmake

package info (click to toggle)
swi-prolog 9.0.4%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 82,408 kB
  • sloc: ansic: 387,503; perl: 359,326; cpp: 6,613; lisp: 6,247; java: 5,540; sh: 3,147; javascript: 2,668; python: 1,900; ruby: 1,594; yacc: 845; makefile: 428; xml: 317; sed: 12; sql: 6
file content (37 lines) | stat: -rw-r--r-- 1,181 bytes parent folder | download
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 \
#	libpcre2-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)