mirror of https://github.com/auygun/kaliber.git
201 lines
7.3 KiB
Plaintext
201 lines
7.3 KiB
Plaintext
config("third_party_config") {
|
|
include_dirs = [
|
|
"vulkan/include",
|
|
"glslang",
|
|
]
|
|
|
|
if (target_os == "linux") {
|
|
defines = [ "VK_USE_PLATFORM_XLIB_KHR" ]
|
|
} else if (target_os == "win") {
|
|
defines = [ "VK_USE_PLATFORM_WIN32_KHR" ]
|
|
} else if (target_os == "android") {
|
|
defines = [ "VK_USE_PLATFORM_ANDROID_KHR" ]
|
|
include_dirs += [ "oboe/include" ]
|
|
}
|
|
}
|
|
|
|
source_set("third_party") {
|
|
public_configs = [ ":third_party_config" ]
|
|
|
|
sources = [
|
|
"glslang/OGLCompilersDLL/InitializeDll.cpp",
|
|
"glslang/SPIRV/GlslangToSpv.cpp",
|
|
"glslang/SPIRV/InReadableOrder.cpp",
|
|
"glslang/SPIRV/Logger.cpp",
|
|
"glslang/SPIRV/SPVRemapper.cpp",
|
|
"glslang/SPIRV/SpvBuilder.cpp",
|
|
"glslang/SPIRV/SpvPostProcess.cpp",
|
|
"glslang/SPIRV/SpvTools.cpp",
|
|
"glslang/SPIRV/disassemble.cpp",
|
|
"glslang/SPIRV/doc.cpp",
|
|
"glslang/glslang/GenericCodeGen/CodeGen.cpp",
|
|
"glslang/glslang/GenericCodeGen/Link.cpp",
|
|
"glslang/glslang/MachineIndependent/Constant.cpp",
|
|
"glslang/glslang/MachineIndependent/InfoSink.cpp",
|
|
"glslang/glslang/MachineIndependent/Initialize.cpp",
|
|
"glslang/glslang/MachineIndependent/IntermTraverse.cpp",
|
|
"glslang/glslang/MachineIndependent/Intermediate.cpp",
|
|
"glslang/glslang/MachineIndependent/ParseContextBase.cpp",
|
|
"glslang/glslang/MachineIndependent/ParseHelper.cpp",
|
|
"glslang/glslang/MachineIndependent/PoolAlloc.cpp",
|
|
"glslang/glslang/MachineIndependent/RemoveTree.cpp",
|
|
"glslang/glslang/MachineIndependent/Scan.cpp",
|
|
"glslang/glslang/MachineIndependent/ShaderLang.cpp",
|
|
"glslang/glslang/MachineIndependent/SpirvIntrinsics.cpp",
|
|
"glslang/glslang/MachineIndependent/SymbolTable.cpp",
|
|
"glslang/glslang/MachineIndependent/Versions.cpp",
|
|
"glslang/glslang/MachineIndependent/attribute.cpp",
|
|
"glslang/glslang/MachineIndependent/glslang_tab.cpp",
|
|
"glslang/glslang/MachineIndependent/intermOut.cpp",
|
|
"glslang/glslang/MachineIndependent/iomapper.cpp",
|
|
"glslang/glslang/MachineIndependent/limits.cpp",
|
|
"glslang/glslang/MachineIndependent/linkValidate.cpp",
|
|
"glslang/glslang/MachineIndependent/parseConst.cpp",
|
|
"glslang/glslang/MachineIndependent/preprocessor/Pp.cpp",
|
|
"glslang/glslang/MachineIndependent/preprocessor/PpAtom.cpp",
|
|
"glslang/glslang/MachineIndependent/preprocessor/PpContext.cpp",
|
|
"glslang/glslang/MachineIndependent/preprocessor/PpScanner.cpp",
|
|
"glslang/glslang/MachineIndependent/preprocessor/PpTokens.cpp",
|
|
"glslang/glslang/MachineIndependent/propagateNoContraction.cpp",
|
|
"glslang/glslang/MachineIndependent/reflection.cpp",
|
|
"jsoncpp/json.h",
|
|
"jsoncpp/jsoncpp.cpp",
|
|
"minimp3/minimp3.cc",
|
|
"minimp3/minimp3.h",
|
|
"minimp3/minimp3_ex.h",
|
|
"spirv-reflect/spirv_reflect.c",
|
|
"stb/stb_image.cc",
|
|
"stb/stb_image.h",
|
|
"stb/stb_truetype.h",
|
|
"texture_compressor/dxt_encoder.cc",
|
|
"texture_compressor/dxt_encoder.h",
|
|
"texture_compressor/dxt_encoder_implementation_autogen.h",
|
|
"texture_compressor/dxt_encoder_internals.cc",
|
|
"texture_compressor/dxt_encoder_internals.h",
|
|
"texture_compressor/texture_compressor.cc",
|
|
"texture_compressor/texture_compressor.h",
|
|
"texture_compressor/texture_compressor_etc1.cc",
|
|
"texture_compressor/texture_compressor_etc1.h",
|
|
"vma/vk_mem_alloc.cpp",
|
|
"volk/volk.c",
|
|
]
|
|
|
|
defines = [
|
|
"VMA_STATIC_VULKAN_FUNCTIONS=1",
|
|
"GLEW_STATIC",
|
|
]
|
|
|
|
cflags = []
|
|
|
|
if (target_os == "linux" || target_os == "win") {
|
|
sources += [
|
|
"glew/glew.c",
|
|
"glew/glew.h",
|
|
]
|
|
}
|
|
|
|
if (target_os == "linux") {
|
|
sources += [
|
|
"glew/glxew.h",
|
|
"glslang/glslang/OSDependent/Unix/ossource.cpp",
|
|
]
|
|
}
|
|
|
|
if (target_os == "win") {
|
|
sources += [
|
|
"glew/wglew.h",
|
|
"glslang/glslang/OSDependent/Windows/ossource.cpp",
|
|
]
|
|
|
|
cflags += [
|
|
"/wd4242", # tmp:conversion from 'int' to 'uint8_t'
|
|
]
|
|
}
|
|
|
|
if (target_os == "android") {
|
|
sources += [
|
|
"$ndk/sources/android/cpufeatures/cpu-features.c",
|
|
"$ndk/sources/android/native_app_glue/android_native_app_glue.c",
|
|
"android/GLContext.cpp",
|
|
"android/gl3stub.c",
|
|
"glslang/glslang/OSDependent/Unix/ossource.cpp",
|
|
"minizip/ioapi.c",
|
|
"minizip/unzip.c",
|
|
"oboe/src/aaudio/AAudioLoader.cpp",
|
|
"oboe/src/aaudio/AudioStreamAAudio.cpp",
|
|
"oboe/src/common/AudioSourceCaller.cpp",
|
|
"oboe/src/common/AudioStream.cpp",
|
|
"oboe/src/common/AudioStreamBuilder.cpp",
|
|
"oboe/src/common/DataConversionFlowGraph.cpp",
|
|
"oboe/src/common/FilterAudioStream.cpp",
|
|
"oboe/src/common/FixedBlockAdapter.cpp",
|
|
"oboe/src/common/FixedBlockReader.cpp",
|
|
"oboe/src/common/FixedBlockWriter.cpp",
|
|
"oboe/src/common/LatencyTuner.cpp",
|
|
"oboe/src/common/OboeExtensions.cpp",
|
|
"oboe/src/common/QuirksManager.cpp",
|
|
"oboe/src/common/SourceFloatCaller.cpp",
|
|
"oboe/src/common/SourceI16Caller.cpp",
|
|
"oboe/src/common/SourceI24Caller.cpp",
|
|
"oboe/src/common/SourceI32Caller.cpp",
|
|
"oboe/src/common/StabilizedCallback.cpp",
|
|
"oboe/src/common/Trace.cpp",
|
|
"oboe/src/common/Utilities.cpp",
|
|
"oboe/src/common/Version.cpp",
|
|
"oboe/src/fifo/FifoBuffer.cpp",
|
|
"oboe/src/fifo/FifoController.cpp",
|
|
"oboe/src/fifo/FifoControllerBase.cpp",
|
|
"oboe/src/fifo/FifoControllerIndirect.cpp",
|
|
"oboe/src/flowgraph/ChannelCountConverter.cpp",
|
|
"oboe/src/flowgraph/ClipToRange.cpp",
|
|
"oboe/src/flowgraph/FlowGraphNode.cpp",
|
|
"oboe/src/flowgraph/ManyToMultiConverter.cpp",
|
|
"oboe/src/flowgraph/MonoBlend.cpp",
|
|
"oboe/src/flowgraph/MonoToMultiConverter.cpp",
|
|
"oboe/src/flowgraph/MultiToManyConverter.cpp",
|
|
"oboe/src/flowgraph/MultiToMonoConverter.cpp",
|
|
"oboe/src/flowgraph/RampLinear.cpp",
|
|
"oboe/src/flowgraph/SampleRateConverter.cpp",
|
|
"oboe/src/flowgraph/SinkFloat.cpp",
|
|
"oboe/src/flowgraph/SinkI16.cpp",
|
|
"oboe/src/flowgraph/SinkI24.cpp",
|
|
"oboe/src/flowgraph/SinkI32.cpp",
|
|
"oboe/src/flowgraph/SourceFloat.cpp",
|
|
"oboe/src/flowgraph/SourceI16.cpp",
|
|
"oboe/src/flowgraph/SourceI24.cpp",
|
|
"oboe/src/flowgraph/SourceI32.cpp",
|
|
"oboe/src/flowgraph/resampler/IntegerRatio.cpp",
|
|
"oboe/src/flowgraph/resampler/LinearResampler.cpp",
|
|
"oboe/src/flowgraph/resampler/MultiChannelResampler.cpp",
|
|
"oboe/src/flowgraph/resampler/PolyphaseResampler.cpp",
|
|
"oboe/src/flowgraph/resampler/PolyphaseResamplerMono.cpp",
|
|
"oboe/src/flowgraph/resampler/PolyphaseResamplerStereo.cpp",
|
|
"oboe/src/flowgraph/resampler/SincResampler.cpp",
|
|
"oboe/src/flowgraph/resampler/SincResamplerStereo.cpp",
|
|
"oboe/src/opensles/AudioInputStreamOpenSLES.cpp",
|
|
"oboe/src/opensles/AudioOutputStreamOpenSLES.cpp",
|
|
"oboe/src/opensles/AudioStreamBuffered.cpp",
|
|
"oboe/src/opensles/AudioStreamOpenSLES.cpp",
|
|
"oboe/src/opensles/EngineOpenSLES.cpp",
|
|
"oboe/src/opensles/OpenSLESUtilities.cpp",
|
|
"oboe/src/opensles/OutputMixerOpenSLES.cpp",
|
|
]
|
|
if (target_cpu == "arm" || target_cpu == "arm64") {
|
|
sources += [
|
|
"texture_compressor/dxt_encoder_neon.cc",
|
|
"texture_compressor/texture_compressor_etc1_neon.cc",
|
|
]
|
|
}
|
|
cflags += [
|
|
"-Wno-nullability-completeness",
|
|
"-Wno-deprecated-enum-enum-conversion",
|
|
]
|
|
include_dirs = [ "oboe/src" ]
|
|
libs = [ "OpenSLES" ]
|
|
}
|
|
|
|
configs -= [ "//build:warnings" ]
|
|
|
|
deps = []
|
|
}
|