diff --git a/BuildLinuxCMake.sh b/BuildLinuxCMake.sh new file mode 100644 index 0000000000000000000000000000000000000000..416c91063d0da8cab3245da706fe86276f68dfe5 --- /dev/null +++ b/BuildLinuxCMake.sh @@ -0,0 +1,8 @@ +#!/bin/bash +rm -rf linux_build +mkdir linux_build +pushd linux_build +cmake .. +make +./StandAlone/glslangValidator -i ../Test/sample.vert ../Test/sample.frag +popd diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..91c9d8a69730abd10ebca75954d2acf5fb888fe2 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,9 @@ +cmake_minimum_required(VERSION 2.8) + +add_subdirectory(glslang/MachineIndependent) +add_subdirectory(glslang/MachineIndependent/preprocessor) +add_subdirectory(glslang/GenericCodeGen) +add_subdirectory(glslang/OSDependent/Linux) +add_subdirectory(OGLCompilersDLL) +add_subdirectory(StandAlone) + diff --git a/OGLCompilersDLL/CMakeLists.txt b/OGLCompilersDLL/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..e61ce7312dc91184a104dd58618beff418eae817 --- /dev/null +++ b/OGLCompilersDLL/CMakeLists.txt @@ -0,0 +1,6 @@ +cmake_minimum_required(VERSION 2.8) + +include_directories(. ../glslang ../glslang/OSDependent/Linux) + +add_library(OGLCompiler STATIC InitializeDll.cpp) + diff --git a/StandAlone/CMakeLists.txt b/StandAlone/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..98f381658699d0c641fb0c4dcdaf8275d6266f56 --- /dev/null +++ b/StandAlone/CMakeLists.txt @@ -0,0 +1,13 @@ +cmake_minimum_required(VERSION 2.8) + +include_directories(. ../glslang/OSDependent/Linux) + +add_executable(glslangValidator StandAlone.cpp) +target_link_libraries(glslangValidator + glslang + GenericCodeGen + OSDependent + Preprocessor + OGLCompiler + pthread) + diff --git a/glslang/GenericCodeGen/CMakeLists.txt b/glslang/GenericCodeGen/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..df4b6f67cfbe393474fdf61dbc7fac5c128fc25e --- /dev/null +++ b/glslang/GenericCodeGen/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 2.8) + +include_directories(. ..) +set(SOURCES CodeGen.cpp Link.cpp) + +add_library(GenericCodeGen STATIC ${SOURCES}) + diff --git a/glslang/MachineIndependent/CMakeLists.txt b/glslang/MachineIndependent/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..dfaef07edb5c36b98773617f402eb5c680ca8a89 --- /dev/null +++ b/glslang/MachineIndependent/CMakeLists.txt @@ -0,0 +1,29 @@ +cmake_minimum_required(VERSION 2.8) + +include_directories(. ../OSDependent/Linux ../../OGLCompilersDLL ${CMAKE_CURRENT_BINARY_DIR}) +set(SOURCES + Constant.cpp + InfoSink.cpp + Initialize.cpp + IntermTraverse.cpp + Intermediate.cpp + ParseHelper.cpp + PoolAlloc.cpp + RemoveTree.cpp + Scan.cpp + ShaderLang.cpp + SymbolTable.cpp + Versions.cpp + intermOut.cpp + limits.cpp + linkValidate.cpp + parseConst.cpp + reflection.cpp) + +find_package(BISON) +BISON_TARGET(GLSLParser glslang.y ${CMAKE_CURRENT_BINARY_DIR}/gen_glslang_tab.cpp + COMPILE_FLAGS + "--defines=${CMAKE_CURRENT_BINARY_DIR}/glslang_tab.cpp.h") + +add_library(glslang STATIC ${BISON_GLSLParser_OUTPUT_SOURCE} ${SOURCES}) + diff --git a/glslang/MachineIndependent/preprocessor/CMakeLists.txt b/glslang/MachineIndependent/preprocessor/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..c13a19eb347641af69492cb229910892dc1c2d2a --- /dev/null +++ b/glslang/MachineIndependent/preprocessor/CMakeLists.txt @@ -0,0 +1,14 @@ +cmake_minimum_required(VERSION 2.8) + +include_directories(. ..) +set(SOURCES + Pp.cpp + PpAtom.cpp + PpContext.cpp + PpMemory.cpp + PpScanner.cpp + PpSymbols.cpp + PpTokens.cpp) + +add_library(Preprocessor STATIC ${SOURCES}) + diff --git a/glslang/OSDependent/Linux/CMakeLists.txt b/glslang/OSDependent/Linux/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..1542de8cf1874151e4fb5e211aacc74c0f98cf93 --- /dev/null +++ b/glslang/OSDependent/Linux/CMakeLists.txt @@ -0,0 +1,6 @@ +cmake_minimum_required(VERSION 2.8) + +include_directories(. ../../../OGLCompilersDLL) + +add_library(OSDependent STATIC ossource.cpp) +