Skip to content

Commit 87e10bc

Browse files
committed
Support Mac OS X
1 parent d7900f4 commit 87e10bc

1 file changed

Lines changed: 13 additions & 7 deletions

File tree

premake4.lua

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22

33
solution "stlsplit"
44
location ( "." )
5+
targetdir("build")
56
configurations { "Debug", "Release" }
67
platforms {"native", "x64", "x32"}
7-
8+
89
configuration "Debug"
910
defines { "DEBUG" }
1011
flags { "Symbols", "ExtraWarnings"}
@@ -18,17 +19,22 @@ solution "stlsplit"
1819
language "C++"
1920
kind "SharedLib"
2021
files { "stlsplit.cpp", "*.h" }
21-
targetdir("build")
22-
linkoptions { "-Wl,-soname,libstlsplit.so.1" }
2322
targetname ("stlsplit")
24-
targetextension (".so.1")
23+
configuration { "linux" }
24+
targetextension (".so.1")
25+
linkoptions { "-Wl,-soname,libstlsplit.so.1" }
26+
postbuildcommands { "ln -sf libstlsplit.so.1 build/libstlsplit.so" }
27+
--cleancommands { "rm build/libstlsplit.so || :" }
28+
configuration { "macosx" }
29+
targetextension (".1.dylib")
30+
postbuildcommands { "ln -sf libstlsplit.1.dylib build/libstlsplit.dylib" }
31+
--cleancommands { "rm build/libstlsplit.dylib || :" }
32+
links { "admesh" }
2533

2634
project "cli"
2735
kind "ConsoleApp"
2836
language "C++"
2937
linkoptions { "-Lbuild" }
30-
links { ":libstlsplit.so.1", "admesh" }
3138
files { "cli.cpp" }
32-
targetdir("build")
3339
targetname ("stlsplit")
34-
40+
links { "stlsplit", "admesh" }

0 commit comments

Comments
 (0)