Browse Source

Update main premake scripts for JUCE_LINUX_EMBED

tags/2018-04-16
falkTX 6 years ago
parent
commit
8d81db8235
2 changed files with 27 additions and 2 deletions
  1. +16
    -0
      libs/juce/build-juce/premake.lua
  2. +11
    -2
      scripts/make-project.lua

+ 16
- 0
libs/juce/build-juce/premake.lua View File

@@ -10,6 +10,21 @@ package.includepaths = {
"../../../sdks/vstsdk2.4/"
}
if (os.getenv("LINUX_EMBED")) then
package.files = {
matchfiles (
"../source/modules/juce_audio_basics/juce_audio_basics.cpp",
"../source/modules/juce_audio_devices/juce_audio_devices.cpp",
"../source/modules/juce_audio_formats/juce_audio_formats.cpp",
"../source/modules/juce_audio_processors/juce_audio_processors.cpp",
"../source/modules/juce_audio_utils/juce_audio_utils.cpp",
"../source/modules/juce_core/juce_core.cpp",
"../source/modules/juce_cryptography/juce_cryptography.cpp",
"../source/modules/juce_data_structures/juce_data_structures.cpp",
"../source/modules/juce_events/juce_events.cpp"
)
}
else
package.files = {
matchfiles (
"../source/modules/juce_audio_basics/juce_audio_basics.cpp",
@@ -27,3 +42,4 @@ package.files = {
"../source/modules/juce_tracktion_marketplace/juce_tracktion_marketplace.cpp"
)
}
end

+ 11
- 2
scripts/make-project.lua View File

@@ -24,7 +24,7 @@ function make_library_project(name)
package.config["Release"].defines = { "NDEBUG=1" }
package.config["Release"].buildoptions = { "-O3", "-fvisibility=hidden", "-fvisibility-inlines-hidden" }

if (not os.getenv("NOOPTIMIZATIONS")) then
if (not (os.getenv("NOOPTIMIZATIONS") or os.getenv("LINUX_EMBED"))) then
package.config["Release"].buildoptions = {
package.config["Release"].buildoptions,
"-mtune=generic", "-msse", "-msse2"
@@ -46,6 +46,9 @@ function make_library_project(name)
elseif (macosx) then
package.defines = { "MAC=1" }
package.buildoptions = { package.buildoptions, "-ObjC++" }
elseif (os.getenv("LINUX_EMBED")) then
package.defines = { "LINUX=1" }
package.buildoptions = { package.buildoptions, "-DJUCE_LINUX_EMBED=1", "-std=c++0x" }
else
package.defines = { "LINUX=1" }
package.buildoptions = { package.buildoptions, "`pkg-config --cflags alsa freetype2 x11 xext`", "-std=c++0x" }
@@ -92,7 +95,7 @@ function make_plugin_project(name, spec)
package.config["Release"].buildoptions = { "-O3", "-ffast-math", "-fomit-frame-pointer", "-fvisibility=hidden", "-fvisibility-inlines-hidden" }
package.config["Release"].links = {}

if (not os.getenv("NOOPTIMIZATIONS")) then
if (not (os.getenv("NOOPTIMIZATIONS") or os.getenv("LINUX_EMBED"))) then
package.config["Release"].buildoptions = {
package.config["Release"].buildoptions,
"-mtune=generic", "-msse", "-msse2", "-mfpmath=sse"
@@ -137,6 +140,10 @@ function make_plugin_project(name, spec)
package.buildoptions = { package.buildoptions, "-std=c++0x" }
end

if (os.getenv("LINUX_EMBED")) then
package.buildoptions = { package.buildoptions, "-DJUCE_LINUX_EMBED=1" }
end

return package
end

@@ -154,6 +161,8 @@ function make_juce_lv2_project(name)
package.linkoptions = { package.linkoptions,
"-framework Accelerate", "-framework AudioToolbox", "-framework AudioUnit", "-framework Carbon", "-framework Cocoa",
"-framework CoreAudio", "-framework CoreAudioKit", "-framework CoreMIDI", "-framework IOKit", "-framework QuartzCore", "-framework WebKit" }
elseif (os.getenv("LINUX_EMBED")) then
package.links = { "dl", "rt" }
else
package.links = { "dl", "rt" }
package.linkoptions = { package.linkoptions, "`pkg-config --libs freetype2 x11 xext`" }


Loading…
Cancel
Save