diff --git a/BuildLinuxCMake.sh b/BuildLinuxCMake.sh new file mode 100644 index 00000000..416c9106 --- /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 00000000..91c9d8a6 --- /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 00000000..e61ce731 --- /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 00000000..98f38165 --- /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 00000000..df4b6f67 --- /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 00000000..dfaef07e --- /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 00000000..c13a19eb --- /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 00000000..1542de8c --- /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) +