improve compatibility with Windows (though it still doesn't work)

This commit is contained in:
Hubert Chathi 2023-04-27 18:52:39 -04:00
parent 5cfe6c3dbd
commit 4b69958c95
2 changed files with 11 additions and 5 deletions

View file

@ -26,7 +26,6 @@ PATH = os.path.dirname(__file__)
DEVELOP = os.environ.get("DEVELOP")
compile_args = ["-I../include"]
link_args = ["-L../build"]
if DEVELOP and DEVELOP.lower() in ["yes", "true", "1"]:
link_args.append('-Wl,-rpath=../build')
@ -44,8 +43,8 @@ ffibuilder.set_source(
#include <olm/sas.h>
""",
libraries=["olm"],
library_dirs=[os.path.join("..", "build")],
extra_compile_args=compile_args,
extra_link_args=link_args,
source_extension=".cpp", # we need to link the C++ standard library, so use a C++ extension
)

View file

@ -12,14 +12,12 @@
+recursive-include libolm/tests *
--- a/olm_build.py
+++ b/olm_build.py
@@ -25,13 +25,30 @@
@@ -25,12 +25,29 @@
DEVELOP = os.environ.get("DEVELOP")
-compile_args = ["-I../include"]
-link_args = ["-L../build"]
+compile_args = ["-Ilibolm/include"]
+link_args = ["-Llibolm/build"]
if DEVELOP and DEVELOP.lower() in ["yes", "true", "1"]:
link_args.append('-Wl,-rpath=../build')
@ -47,3 +45,12 @@
+ subprocess.run(["make", "static"], cwd="libolm", check=True)
ffibuilder.set_source(
@@ -43,7 +60,7 @@
#include <olm/sas.h>
""",
libraries=["olm"],
- library_dirs=[os.path.join("..", "build")],
+ library_dirs=[os.path.join("libolm", "build")],
extra_compile_args=compile_args,
source_extension=".cpp", # we need to link the C++ standard library, so use a C++ extension
)