Added CMake stuff to compile bgfx shaderc
parent
a3d5bfcce5
commit
73f432c266
|
@ -1,6 +1,7 @@
|
|||
PROJECT (BGFX CXX)
|
||||
|
||||
FIND_PACKAGE (OpenGL)
|
||||
FIND_PACKAGE (Threads)
|
||||
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
|
||||
|
||||
|
@ -20,6 +21,21 @@ INCLUDE_DIRECTORIES (
|
|||
${CMAKE_CURRENT_SOURCE_DIR}/examples/common
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/3rdparty
|
||||
${OPENGL_INCLUDE_DIR}
|
||||
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/fcpp/
|
||||
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/glsl-optimizer/include/
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/glsl-optimizer/src/
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/glsl-optimizer/src/glsl/
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/glsl-optimizer/src/mesa/
|
||||
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/glslang/glslang/Public/
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/glslang/glslang/Include/
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/glslang/
|
||||
|
||||
${CMAKE_CURRENT_BINARY_DIR}/src
|
||||
|
||||
|
||||
)
|
||||
|
||||
SET (BGFX_SOURCES
|
||||
|
@ -48,3 +64,109 @@ ADD_LIBRARY ( bgfx_aux SHARED ${BGFX_AUX_SOURCES} )
|
|||
TARGET_LINK_LIBRARIES (bgfx
|
||||
${OPENGL_LIBRARIES}
|
||||
)
|
||||
|
||||
#
|
||||
# shaderc compilation
|
||||
#
|
||||
|
||||
file(GLOB glcpp-library_sources
|
||||
3rdparty/glsl-optimizer/src/mesa/main/*.c
|
||||
3rdparty/glsl-optimizer/src/mesa/program/*.c
|
||||
3rdparty/glsl-optimizer/src/glsl/glcpp/*.c
|
||||
3rdparty/glsl-optimizer/src/glsl/*.cpp
|
||||
3rdparty/glsl-optimizer/src/glsl/*.c
|
||||
3rdparty/glsl-optimizer/src/util/*.c
|
||||
)
|
||||
|
||||
list(REMOVE_ITEM glcpp-library_sources
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/glsl-optimizer/src/glsl/main.cpp)
|
||||
|
||||
SET ( glslang_SRCS
|
||||
3rdparty/glslang/OGLCompilersDLL/InitializeDll.cpp
|
||||
3rdparty/glslang/SPIRV/SPVRemapper.cpp
|
||||
3rdparty/glslang/SPIRV/InReadableOrder.cpp
|
||||
3rdparty/glslang/SPIRV/SpvBuilder.cpp
|
||||
3rdparty/glslang/SPIRV/doc.cpp
|
||||
3rdparty/glslang/SPIRV/disassemble.cpp
|
||||
3rdparty/glslang/SPIRV/GlslangToSpv.cpp
|
||||
3rdparty/glslang/SPIRV/Logger.cpp
|
||||
# 3rdparty/glslang/StandAlone/StandAlone.cpp
|
||||
# 3rdparty/glslang/StandAlone/ResourceLimits.cpp
|
||||
# 3rdparty/glslang/StandAlone/spirv-remap.cpp
|
||||
3rdparty/glslang/hlsl/hlslGrammar.cpp
|
||||
3rdparty/glslang/hlsl/hlslParseHelper.cpp
|
||||
3rdparty/glslang/hlsl/hlslParseables.cpp
|
||||
3rdparty/glslang/hlsl/hlslTokenStream.cpp
|
||||
3rdparty/glslang/hlsl/hlslAttributes.cpp
|
||||
3rdparty/glslang/hlsl/hlslOpMap.cpp
|
||||
3rdparty/glslang/hlsl/hlslScanContext.cpp
|
||||
3rdparty/glslang/glslang/OSDependent/Unix/ossource.cpp
|
||||
# 3rdparty/glslang/glslang/OSDependent/Windows/ossource.cpp
|
||||
# 3rdparty/glslang/glslang/OSDependent/Windows/main.cpp
|
||||
3rdparty/glslang/glslang/GenericCodeGen/CodeGen.cpp
|
||||
3rdparty/glslang/glslang/GenericCodeGen/Link.cpp
|
||||
3rdparty/glslang/glslang/MachineIndependent/parseConst.cpp
|
||||
3rdparty/glslang/glslang/MachineIndependent/iomapper.cpp
|
||||
3rdparty/glslang/glslang/MachineIndependent/Intermediate.cpp
|
||||
3rdparty/glslang/glslang/MachineIndependent/limits.cpp
|
||||
3rdparty/glslang/glslang/MachineIndependent/Scan.cpp
|
||||
3rdparty/glslang/glslang/MachineIndependent/glslang_tab.cpp
|
||||
3rdparty/glslang/glslang/MachineIndependent/SymbolTable.cpp
|
||||
3rdparty/glslang/glslang/MachineIndependent/ParseHelper.cpp
|
||||
3rdparty/glslang/glslang/MachineIndependent/Constant.cpp
|
||||
3rdparty/glslang/glslang/MachineIndependent/InfoSink.cpp
|
||||
3rdparty/glslang/glslang/MachineIndependent/RemoveTree.cpp
|
||||
3rdparty/glslang/glslang/MachineIndependent/IntermTraverse.cpp
|
||||
3rdparty/glslang/glslang/MachineIndependent/Versions.cpp
|
||||
3rdparty/glslang/glslang/MachineIndependent/PoolAlloc.cpp
|
||||
3rdparty/glslang/glslang/MachineIndependent/intermOut.cpp
|
||||
3rdparty/glslang/glslang/MachineIndependent/reflection.cpp
|
||||
3rdparty/glslang/glslang/MachineIndependent/Initialize.cpp
|
||||
3rdparty/glslang/glslang/MachineIndependent/ParseContextBase.cpp
|
||||
3rdparty/glslang/glslang/MachineIndependent/linkValidate.cpp
|
||||
3rdparty/glslang/glslang/MachineIndependent/ShaderLang.cpp
|
||||
3rdparty/glslang/glslang/MachineIndependent/preprocessor/PpMemory.cpp
|
||||
3rdparty/glslang/glslang/MachineIndependent/preprocessor/PpTokens.cpp
|
||||
3rdparty/glslang/glslang/MachineIndependent/preprocessor/Pp.cpp
|
||||
3rdparty/glslang/glslang/MachineIndependent/preprocessor/PpContext.cpp
|
||||
3rdparty/glslang/glslang/MachineIndependent/preprocessor/PpSymbols.cpp
|
||||
3rdparty/glslang/glslang/MachineIndependent/preprocessor/PpAtom.cpp
|
||||
3rdparty/glslang/glslang/MachineIndependent/preprocessor/PpScanner.cpp
|
||||
3rdparty/glslang/glslang/MachineIndependent/propagateNoContraction.cpp
|
||||
)
|
||||
|
||||
ADD_EXECUTABLE (shaderc
|
||||
../bx/src/amalgamated.cpp
|
||||
|
||||
src/shader.cpp
|
||||
src/shader_spirv.cpp
|
||||
src/shader_dxbc.cpp
|
||||
src/shader_dx9bc.cpp
|
||||
|
||||
tools/shaderc/shaderc.cpp
|
||||
tools/shaderc/shaderc_glsl.cpp
|
||||
tools/shaderc/shaderc.h
|
||||
tools/shaderc/shaderc_hlsl.cpp
|
||||
tools/shaderc/shaderc_pssl.cpp
|
||||
tools/shaderc/shaderc_spirv.cpp
|
||||
|
||||
${glcpp-library_sources}
|
||||
|
||||
3rdparty/fcpp/cpp1.c
|
||||
3rdparty/fcpp/cpp2.c
|
||||
3rdparty/fcpp/cpp3.c
|
||||
3rdparty/fcpp/cpp4.c
|
||||
3rdparty/fcpp/cpp5.c
|
||||
3rdparty/fcpp/cpp6.c
|
||||
|
||||
${glslang_SRCS}
|
||||
)
|
||||
|
||||
SET_TARGET_PROPERTIES ( shaderc PROPERTIES
|
||||
COMPILE_FLAGS "-fno-strict-aliasing"
|
||||
)
|
||||
|
||||
TARGET_LINK_LIBRARIES ( shaderc
|
||||
pthread
|
||||
dl
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue