Skip to content

Commit

Permalink
Build: fix linking with incorrect library on Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
bakana808 committed Jul 12, 2024
1 parent 31ae932 commit 99d39b9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions SConstruct
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env python
import subprocess
import os
from pathlib import Path

ADDON_DIR = "project/addons/libm8gd"
Expand All @@ -21,7 +22,7 @@ def call_split(*args) -> list[str]:
Path(BUILD_DIR).mkdir(exist_ok=True)


USING_OSXCROSS: bool = "osxcross_sdk" in env
USING_OSXCROSS: bool = "OSXCROSS_ROOT" in os.environ

if USING_OSXCROSS:
if env["arch"] == "universal":
Expand Down Expand Up @@ -55,7 +56,7 @@ env.Append(CFLAGS=CFLAGS)

print("architecture: %s" % env["arch"])

if USING_OSXCROSS:
if env["platform"] == "macos" and USING_OSXCROSS:
# explicitly link the static library
LIB_FILE = (
call(PKG_CONFIG, "--variable=libdir", "libserialport") + "/libserialport.a"
Expand Down

0 comments on commit 99d39b9

Please sign in to comment.