diff options
| author | Timothee Cour <timothee.cour2@gmail.com> | 2019-01-29 21:47:53 -0800 |
|---|---|---|
| committer | genotrance <dev@genotrance.com> | 2019-01-29 23:47:53 -0600 |
| commit | ef8149778cc0a9c99b2f9904e16913f5be70e5b4 (patch) | |
| tree | 9e462305fb57688e21d53f33943ebad9f5084504 | |
| parent | 69aaa8725362b04eebe1ae1ddf57f3c9cd4d7a6d (diff) | |
| download | nimterop-ef8149778cc0a9c99b2f9904e16913f5be70e5b4.tar.gz nimterop-ef8149778cc0a9c99b2f9904e16913f5be70e5b4.zip | |
make tsoloud work on OSX (#84)
| -rw-r--r-- | nimterop.nimble | 9 | ||||
| -rw-r--r-- | tests/tsoloud.nim | 11 |
2 files changed, 10 insertions, 10 deletions
diff --git a/nimterop.nimble b/nimterop.nimble index ec034f0..bcdd78d 100644 --- a/nimterop.nimble +++ b/nimterop.nimble @@ -40,13 +40,8 @@ proc testAll() = when defined(Windows): execCmd "nim c -r tests/tmath.nim" execCmd "nim cpp -r tests/tmath.nim" - tsoloud() - elif defined(osx): - discard - elif existsEnv("TRAVIS"): - discard - else: - tsoloud() + if defined(OSX) or defined(Windows) or not existsEnv("TRAVIS"): + tsoloud() # requires some libraries on linux, need them installed in TRAVIS task test, "Test": for options in ["", "-d:release"]: diff --git a/tests/tsoloud.nim b/tests/tsoloud.nim index 2d1c40d..ea7bbb2 100644 --- a/tests/tsoloud.nim +++ b/tests/tsoloud.nim @@ -22,16 +22,21 @@ cSkipSymbol("WavStream_stop", "WavStream_setFilter") cIncludeDir(incl) -when defined(Linux): +when defined(osx): + cDefine("WITH_COREAUDIO") + {.passL: "-framework CoreAudio -framework AudioToolbox".} + cCompile(src/"backend/coreaudio/*.cpp") +elif defined(Linux): {.passL: "-lpthread".} cDefine("WITH_OSS") cCompile(src/"backend/oss/*.cpp") - -when defined(Windows): +elif defined(Windows): {.passC: "-msse".} {.passL: "-lwinmm".} cDefine("WITH_WINMM") cCompile(src/"backend/winmm/*.cpp") +else: + static: doAssert false cCompile(src/"c_api/soloud_c.cpp") cCompile(src/"core/*.cpp") |
