Skip to content

Commit ad6bd08

Browse files
jakobhellermannK0lb3
authored andcommitted
build: use libXX naming convention on macOS/linux
1 parent 01631e0 commit ad6bd08

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

TypeTreeGeneratorAPI/TypeTreeGeneratorAPI.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
<EnableTrimAnalyzer>true</EnableTrimAnalyzer>
99
<InvariantGlobalization>true</InvariantGlobalization>
1010
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
11+
12+
<TargetName>$(MSBuildProjectName)</TargetName>
13+
<TargetName Condition="'$(OS)' != 'Windows_NT'">lib$(TargetName)</TargetName>
1114
</PropertyGroup>
1215

1316
<ItemGroup>

bindings/python/TypeTreeGeneratorAPI/TypeTreeGenerator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ def init_dll(asm_path: Optional[str] = None):
4040
fp = asm_path or os.path.join(LOCAL, "TypeTreeGeneratorAPI.dll")
4141
dll = ctypes.WinDLL(fp)
4242
elif system == "Linux":
43-
fp = asm_path or os.path.join(LOCAL, "TypeTreeGeneratorAPI.so")
43+
fp = asm_path or os.path.join(LOCAL, "libTypeTreeGeneratorAPI.so")
4444
dll = ctypes.CDLL(fp)
4545
elif system == "Darwin":
46-
fp = asm_path or os.path.join(LOCAL, "TypeTreeGeneratorAPI.dylib")
46+
fp = asm_path or os.path.join(LOCAL, "libTypeTreeGeneratorAPI.dylib")
4747
dll = ctypes.CDLL(fp)
4848
else:
4949
raise NotImplementedError(f"TypeTreeGenerator doesn't support {system}!")

0 commit comments

Comments
 (0)