aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/tools/python/base/CMakeModules.inc
blob: 75dac657acf9a88e3f88f77c8110c74a8e419176 (plain) (blame)
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
# Generated automatically by ../modules.py

ADDINCL(contrib/libs/expat)
ADDINCL(contrib/libs/libbz2)
ADDINCL(contrib/libs/zlib)
PEERDIR(contrib/libs/expat)
PEERDIR(contrib/libs/libbz2)
PEERDIR(contrib/libs/openssl)
PEERDIR(contrib/libs/zlib)
SRCS(Modules/_bisectmodule.c
     Modules/_collectionsmodule.c
     Modules/_csv.c
     Modules/_elementtree.c
     Modules/_functoolsmodule.c
     Modules/_hashopenssl.c
     Modules/_heapqmodule.c
     Modules/_hotshot.c
     Modules/_io/_iomodule.c
     Modules/_io/bufferedio.c
     Modules/_io/bytesio.c
     Modules/_io/fileio.c
     Modules/_io/iobase.c
     Modules/_io/stringio.c
     Modules/_io/textio.c
     Modules/_json.c
     Modules/_localemodule.c
     Modules/_lsprof.c
     Modules/_math.c
     Modules/_randommodule.c
     Modules/_struct.c
     Modules/arraymodule.c
     Modules/audioop.c
     Modules/binascii.c
     Modules/bz2module.c
     Modules/cPickle.c
     Modules/cStringIO.c
     Modules/cjkcodecs/multibytecodec.c
     Modules/cmathmodule.c
     Modules/datetimemodule.c
     Modules/future_builtins.c
     Modules/itertoolsmodule.c
     Modules/mathmodule.c
     Modules/md5.c
     Modules/md5module.c
     Modules/mmapmodule.c
     Modules/operator.c
     Modules/parsermodule.c
     Modules/rotatingtree.c
     Modules/sha256module.c
     Modules/sha512module.c
     Modules/shamodule.c
     Modules/stropmodule.c
     Modules/timemodule.c
     Modules/unicodedata.c
     Modules/zlibmodule.c)

CFLAGS(-DBUILD_ZLIB)

IF (ARCH_X86_64 OR ARCH_I386 OR ARCH_PPC64LE OR ARCH_AARCH64)
    IF (OS_CYGWIN)
        #TODO
    ELSE()
        PEERDIR(contrib/restricted/libffi)

        ADDINCL(contrib/restricted/libffi/include)

        SRCS(
            Modules/_ctypes/_ctypes.c
            Modules/_ctypes/callbacks.c
            Modules/_ctypes/callproc.c
            Modules/_ctypes/cfield.c
            Modules/_ctypes/stgdict.c
        )
    ENDIF()
ENDIF()

IF(FREEBSD)
    IF(FREEBSD_VER GREATER 7)
        SRCS(Modules/_multiprocessing/multiprocessing.c
             Modules/_multiprocessing/semaphore.c
             Modules/_multiprocessing/socket_connection.c)
    ENDIF(FREEBSD_VER GREATER 7)
    IF(FREEBSD_VER LESS 8)
        SRCS(Modules/_multiprocessing/multiprocessing.c
             Modules/_multiprocessing/socket_connection.c)
    ENDIF(FREEBSD_VER LESS 8)
ENDIF(FREEBSD)

IF(LINUX)
    SRCS(Modules/_multiprocessing/multiprocessing.c
         Modules/_multiprocessing/semaphore.c
         Modules/_multiprocessing/socket_connection.c
         Modules/spwdmodule.c
    )
ENDIF(LINUX)

IF(DARWIN OR OS_CYGWIN OR OS_IOS)
    SRCS(Modules/_multiprocessing/multiprocessing.c
         Modules/_multiprocessing/semaphore.c
         Modules/_multiprocessing/socket_connection.c
    )
ENDIF(DARWIN OR OS_CYGWIN OR OS_IOS)

IF (OS_DARWIN)
    SRCS(
        Mac/Modules/_scproxy.c
    )
ENDIF()

IF (UNIX)
    SRCS(Modules/_ssl.c
         Modules/cryptmodule.c
         Modules/fcntlmodule.c
         Modules/grpmodule.c
         Modules/posixmodule.c
         Modules/pwdmodule.c
         Modules/pyexpat.c
         Modules/resource.c
         Modules/selectmodule.c
         Modules/socketmodule.c
         Modules/syslogmodule.c
         Modules/termios.c
    )

    IF (OS_CYGWIN)
        #PASS
    ELSEIF (NOT DARWIN AND NOT OS_IOS)
        EXTRALIBS(crypt)
    ENDIF()

    # bpo-30947: Python uses best available entropy sources to
    # call XML_SetHashSalt(), expat entropy sources are not needed
    CFLAGS(-DHAVE_EXPAT_CONFIG_H -DXML_POOR_ENTROPY -DUSE_PYEXPAT_CAPI)
ENDIF(UNIX)

IF (OS_WINDOWS)
    SRCS(Modules/_multiprocessing/multiprocessing.c
         Modules/_multiprocessing/pipe_connection.c
         Modules/_multiprocessing/semaphore.c
         Modules/_multiprocessing/socket_connection.c
         Modules/_multiprocessing/win32_functions.c
         Modules/_ssl.c
         Modules/posixmodule.c
         Modules/pyexpat.c
         Modules/selectmodule.c
         Modules/socketmodule.c
    )
    LDFLAGS(crypt32.lib ws2_32.lib)

    CFLAGS(-DHAVE_EXPAT_CONFIG_H -DXML_POOR_ENTROPY -DHAVE_MEMMOVE -DUSE_PYEXPAT_CAPI)
    CFLAGS(-DEAI_ADDRFAMILY=1 -DHAVE_SOCKADDR_STORAGE=1 -DHAVE_ADDRINFO=1)
    IF (ARCH_X86_64)
        CFLAGS(/D_WIN64 /D_M_X64)
    ENDIF()
ENDIF(WIN32)