if(WIN32)\r
set(CMAKE_GENERATOR_TOOLSET "v110" CACHE STRING "Platform Toolset" FORCE)\r
include(ChooseMSVCCRT.cmake)\r
- foreach(build_type ${CMAKE_CONFIGURATION_TYPES} ${CMAKE_BUILD_TYPE})\r
- string(TOUPPER "${build_type}" build)\r
- message("CMAKE_CXX_FLAGS_${build} are ${CMAKE_CXX_FLAGS_${build}}")\r
- endforeach(build_type)\r
-\r
- add_subdirectory(glslang/OSDependent/Windows)\r
elseif(UNIX)\r
- add_subdirectory(glslang/OSDependent/Linux)\r
else(WIN32)\r
message("unkown platform")\r
endif(WIN32)\r
\r
-add_subdirectory(glslang/MachineIndependent)\r
-add_subdirectory(glslang/MachineIndependent/preprocessor)\r
-add_subdirectory(glslang/GenericCodeGen)\r
+add_subdirectory(glslang)\r
add_subdirectory(OGLCompilersDLL)\r
add_subdirectory(StandAlone)\r
elseif(UNIX)\r
include_directories(${include_directories} ../glslang/OSDependent/Linux)\r
else(WIN32)\r
- message("unkown platform")\r
+ message("unknown platform")\r
endif(WIN32)\r
\r
-add_library(OGLCompiler STATIC InitializeDll.cpp InitializeDll.h)\r
+set(SOURCES InitializeDll.cpp InitializeDll.h)\r
+\r
+add_library(OGLCompiler STATIC ${SOURCES})\r
+\r
+if(WIN32)\r
+ source_group("Source" FILES ${SOURCES})\r
+endif(WIN32)\r
\r
install(TARGETS OGLCompiler \r
ARCHIVE DESTINATION lib)\r
-cmake_minimum_required(VERSION 2.8)
-
-include_directories(.)
-if(WIN32)
- include_directories(${include_directories} ../glslang/OSDependent/Windows)
-elseif(UNIX)
- include_directories(${include_directories} ../glslang/OSDependent/Linux)
-else(WIN32)
- message("unkown platform")
-endif(WIN32)
-
-add_executable(glslangValidator StandAlone.cpp)
-
-set(LIBRARIES
- glslang
- GenericCodeGen
- OSDependent
- Preprocessor
- OGLCompiler)
-
-if(WIN32)
- set(LIBRARIES ${LIBRARIES} psapi)
-elseif(UNIX)
- set(LIBRARIES ${LIBRARIES} pthread)
-endif(WIN32)
-
-target_link_libraries(glslangValidator ${LIBRARIES})
-
-install(TARGETS glslangValidator
- RUNTIME DESTINATION bin)
+cmake_minimum_required(VERSION 2.8)\r
+\r
+include_directories(.)\r
+if(WIN32)\r
+ include_directories(${include_directories} ../glslang/OSDependent/Windows)\r
+elseif(UNIX)\r
+ include_directories(${include_directories} ../glslang/OSDependent/Linux)\r
+else(WIN32)\r
+ message("unkown platform")\r
+endif(WIN32)\r
+\r
+set(SOURCES StandAlone.cpp)\r
+\r
+add_executable(glslangValidator ${SOURCES})\r
+\r
+set(LIBRARIES\r
+ glslang\r
+ OGLCompiler\r
+ OSDependent)\r
+\r
+if(WIN32)\r
+ set(LIBRARIES ${LIBRARIES} psapi)\r
+elseif(UNIX)\r
+ set(LIBRARIES ${LIBRARIES} pthread)\r
+endif(WIN32)\r
+\r
+target_link_libraries(glslangValidator ${LIBRARIES})\r
+\r
+if(WIN32)\r
+ source_group("Source" FILES ${SOURCES})\r
+endif(WIN32)\r
+\r
+install(TARGETS glslangValidator\r
+ RUNTIME DESTINATION bin)\r
--- /dev/null
+cmake_minimum_required(VERSION 2.8)\r
+\r
+include_directories(MachineIndependent ../OGLCompilersDLL ${CMAKE_CURRENT_BINARY_DIR})\r
+if(WIN32)\r
+ add_subdirectory(OSDependent/Windows)\r
+ include_directories(${include_directories} OSDependent/Windows)\r
+elseif(UNIX)\r
+ add_subdirectory(OSDependent/Linux)\r
+ include_directories(${include_directories} OSDependent/Linux)\r
+else(WIN32)\r
+ message("unkown platform")\r
+endif(WIN32)\r
+\r
+set(SOURCES\r
+ MachineIndependent/glslang.y\r
+ MachineIndependent/Constant.cpp\r
+ MachineIndependent/InfoSink.cpp\r
+ MachineIndependent/Initialize.cpp\r
+ MachineIndependent/IntermTraverse.cpp\r
+ MachineIndependent/Intermediate.cpp\r
+ MachineIndependent/ParseHelper.cpp\r
+ MachineIndependent/PoolAlloc.cpp\r
+ MachineIndependent/RemoveTree.cpp\r
+ MachineIndependent/Scan.cpp\r
+ MachineIndependent/ShaderLang.cpp\r
+ MachineIndependent/SymbolTable.cpp\r
+ MachineIndependent/Versions.cpp\r
+ MachineIndependent/intermOut.cpp\r
+ MachineIndependent/limits.cpp\r
+ MachineIndependent/linkValidate.cpp\r
+ MachineIndependent/parseConst.cpp\r
+ MachineIndependent/reflection.cpp\r
+ MachineIndependent/preprocessor/Pp.cpp\r
+ MachineIndependent/preprocessor/PpAtom.cpp\r
+ MachineIndependent/preprocessor/PpContext.cpp\r
+ MachineIndependent/preprocessor/PpMemory.cpp\r
+ MachineIndependent/preprocessor/PpScanner.cpp\r
+ MachineIndependent/preprocessor/PpSymbols.cpp\r
+ MachineIndependent/preprocessor/PpTokens.cpp\r
+ GenericCodeGen/CodeGen.cpp\r
+ GenericCodeGen/Link.cpp)\r
+\r
+set(HEADERS\r
+ Public/ShaderLang.h\r
+ Include/BaseTypes.h\r
+ Include/Common.h\r
+ Include/ConstantUnion.h\r
+ Include/InfoSink.h\r
+ Include/InitializeGlobals.h\r
+ Include/intermediate.h\r
+ Include/PoolAlloc.h\r
+ Include/ResourceLimits.h\r
+ Include/revision.h\r
+ Include/ShHandle.h\r
+ Include/Types.h\r
+ MachineIndependent/gl_types.h\r
+ MachineIndependent/Initialize.h\r
+ MachineIndependent/localintermediate.h\r
+ MachineIndependent/ParseHelper.h\r
+ MachineIndependent/reflection.h\r
+ MachineIndependent/RemoveTree.h\r
+ MachineIndependent/Scan.h\r
+ MachineIndependent/ScanContext.h\r
+ MachineIndependent/SymbolTable.h\r
+ MachineIndependent/unistd.h\r
+ MachineIndependent/Versions.h\r
+ MachineIndependent/preprocessor/PpContext.h\r
+ MachineIndependent/preprocessor/PpTokens.h)\r
+\r
+find_package(BISON)\r
+if(BISON_FOUND)\r
+ message("bison found")\r
+ BISON_TARGET(GLSLParser glslang.y ${CMAKE_CURRENT_BINARY_DIR}/gen_glslang_tab.cpp\r
+ COMPILE_FLAGS\r
+ "--defines=${CMAKE_CURRENT_BINARY_DIR}/glslang_tab.cpp.h")\r
+else(BISON_FOUND)\r
+ message("using custom command for bison on glslang.y")\r
+ add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/glslang_tab.cpp ${CMAKE_CURRENT_BINARY_DIR}/glslang_tab.cpp.h\r
+ COMMAND ../tools/bison.exe --defines=${CMAKE_CURRENT_BINARY_DIR}/glslang_tab.cpp.h -t MachineIndependent/glslang.y -o ${CMAKE_CURRENT_BINARY_DIR}/glslang_tab.cpp\r
+ MAIN_DEPENDENCY MachineIndependent/glslang.y\r
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})\r
+ set(BISON_GLSLParser_OUTPUT_SOURCE ${CMAKE_CURRENT_BINARY_DIR}/glslang_tab.cpp)\r
+endif(BISON_FOUND)\r
+\r
+add_library(glslang STATIC ${BISON_GLSLParser_OUTPUT_SOURCE} ${SOURCES} ${HEADERS})\r
+\r
+if(WIN32)\r
+ source_group("Public" REGULAR_EXPRESSION "Public/*")\r
+ source_group("MachineIndependent" REGULAR_EXPRESSION "MachineIndependent/[^/]*")\r
+ source_group("Generated Files" FILES ${CMAKE_CURRENT_BINARY_DIR}/glslang_tab.cpp ${CMAKE_CURRENT_BINARY_DIR}/glslang_tab.cpp.h)\r
+ source_group("Include" REGULAR_EXPRESSION "Include/[^/]*")\r
+ source_group("GenericCodeGen" REGULAR_EXPRESSION "GenericCodeGen/*")\r
+ source_group("MachineIndependent\\Preprocessor" REGULAR_EXPRESSION "MachineIndependent/preprocessor/*")\r
+endif(WIN32)\r
+\r
+install(TARGETS glslang \r
+ ARCHIVE DESTINATION lib)\r
+++ /dev/null
-cmake_minimum_required(VERSION 2.8)
-
-include_directories(. ..)
-set(SOURCES CodeGen.cpp Link.cpp)
-
-add_library(GenericCodeGen STATIC ${SOURCES})
-
+++ /dev/null
-cmake_minimum_required(VERSION 2.8)\r
-\r
-include_directories(. ../../OGLCompilersDLL ${CMAKE_CURRENT_BINARY_DIR})\r
-if(WIN32)\r
- include_directories(${include_directories} ../OSDependent/Windows)\r
-elseif(UNIX)\r
- include_directories(${include_directories} ../OSDependent/Linux)\r
-else(WIN32)\r
- message("unkown platform")\r
-endif(WIN32)\r
-\r
-set(SOURCES\r
- Constant.cpp\r
- InfoSink.cpp\r
- Initialize.cpp\r
- IntermTraverse.cpp\r
- Intermediate.cpp\r
- ParseHelper.cpp\r
- PoolAlloc.cpp\r
- RemoveTree.cpp\r
- Scan.cpp\r
- ShaderLang.cpp\r
- SymbolTable.cpp\r
- Versions.cpp\r
- intermOut.cpp\r
- limits.cpp\r
- linkValidate.cpp\r
- parseConst.cpp\r
- reflection.cpp)\r
-\r
-set(HEADERS\r
- ../Public/ShaderLang.h\r
- gl_types.h\r
- Initialize.h\r
- localintermediate.h\r
- ParseHelper.h\r
- reflection.h\r
- RemoveTree.h\r
- Scan.h\r
- ScanContext.h\r
- SymbolTable.h\r
- unistd.h\r
- Versions.h)\r
-\r
-find_package(BISON)\r
-if(BISON_FOUND)\r
- message("bison found")\r
- BISON_TARGET(GLSLParser glslang.y ${CMAKE_CURRENT_BINARY_DIR}/gen_glslang_tab.cpp\r
- COMPILE_FLAGS\r
- "--defines=${CMAKE_CURRENT_BINARY_DIR}/glslang_tab.cpp.h")\r
-else(BISON_FOUND)\r
- message("using custom command for bison on glslang.y")\r
- add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/glslang_tab.cpp ${CMAKE_CURRENT_BINARY_DIR}/glslang_tab.cpp.h\r
- COMMAND ../../tools/bison.exe --defines=${CMAKE_CURRENT_BINARY_DIR}/glslang_tab.cpp.h -t glslang.y -o ${CMAKE_CURRENT_BINARY_DIR}/glslang_tab.cpp\r
- MAIN_DEPENDENCY glslang.y\r
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})\r
- set(BISON_GLSLParser_OUTPUT_SOURCE glslang_tab.cpp)\r
-endif(BISON_FOUND)\r
-\r
-add_library(glslang STATIC ${BISON_GLSLParser_OUTPUT_SOURCE} ${SOURCES} ${HEADERS})\r
-\r
-install(TARGETS glslang \r
- ARCHIVE DESTINATION lib)\r
+++ /dev/null
-cmake_minimum_required(VERSION 2.8)\r
-\r
-include_directories(. ..)\r
-set(SOURCES \r
- Pp.cpp\r
- PpAtom.cpp\r
- PpContext.cpp\r
- PpMemory.cpp\r
- PpScanner.cpp\r
- PpSymbols.cpp\r
- PpTokens.cpp)\r
-\r
-set(HEADERS\r
- PpContext.h\r
- PpTokens.h)\r
-\r
-add_library(Preprocessor STATIC ${SOURCES} ${HEADERS})\r
-
-install(TARGETS Preprocessor\r
- ARCHIVE DESTINATION lib)\r
\r
include_directories(. ../../../OGLCompilersDLL)\r
\r
-add_library(OSDependent STATIC ossource.cpp osinclude.h)\r
+set(SOURCES ossource.cpp osinclude.h)\r
+\r
+add_library(OSDependent STATIC ${SOURCES})\r
+\r
+if(WIN32)\r
+ source_group("Source" FILES ${SOURCES})\r
+endif(WIN32)\r
\r
install(TARGETS OSDependent \r
ARCHIVE DESTINATION lib)\r