diff options
author | Tomasz CEDRO <cederom@tlen.pl> | 2021-05-11 17:32:09 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-11 23:32:09 +0800 |
commit | 1859a8633a633886b5b2c23930ae640e9d90bd36 (patch) | |
tree | 1607bfbb9da44f96ac4412fc4384e6ea98101178 | |
parent | 71f5c64c43b9868ab08c3a9bad82ba3563e9436d (diff) | |
download | capstone-1859a8633a633886b5b2c23930ae640e9d90bd36.tar.gz |
Fixes the (pip) Python Module build on FreeBSD. (#1750)
Signed-off-by: Tomasz 'CeDeROM' CEDRO <tomek@cedro.info>
-rwxr-xr-x | bindings/python/setup.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/bindings/python/setup.py b/bindings/python/setup.py index 9d0b06af..ab92fa98 100755 --- a/bindings/python/setup.py +++ b/bindings/python/setup.py @@ -140,6 +140,13 @@ def build_libraries(): # Do not build tests & static library os.system('cmake -DCMAKE_BUILD_TYPE=RELEASE -DCAPSTONE_BUILD_TESTS=0 -DCAPSTONE_BUILD_STATIC=0 -G "NMake Makefiles" ..') os.system("nmake") + elif "freebsd" in SYSTEM: + # FreeBSD distinguishes make (BSD) vs gmake (GNU). Use cmake + bsd make :-) + if not os.path.exists("build"): os.mkdir("build") + os.chdir("build") + # Do not build tests & static library + os.system('cmake -DCMAKE_BUILD_TYPE=RELEASE -DCAPSTONE_BUILD_TESTS=0 -DCAPSTONE_BUILD_STATIC=0 ..') + os.system("make") else: # Unix incl. cygwin os.system("CAPSTONE_BUILD_CORE_ONLY=yes bash ./make.sh") |