## Custom glslang version
The Glslang repository is not a git sub-module of Vulkan-Tools, but glslang components are required to build
-the cube and vulkaninfo applications. By default, the cmake scripts will download the required
+the cube and cubepp applications. By default, the cmake scripts will download the required
components into the repo 'glslang' directory.
-If a specific version of the glslang components is desired, perform the following steps:
+If a *specific* version of the glslang components is desired, perform the following steps:
1) clone the glslang repository:
`git clone https://github.com/KhronosGroup/glslang.git`
-2) Configure the glslang source tree with CMake and build it with your IDE of choice
+2) Configure the glslang source tree with CMake and build it with your IDE of choice, following the instructions
+ in the glslang BUILD.md document including using the INSTALL_PREFIX and 'make install'. Note the install directory.
-3) Pass the location of the glslang repository using an absolute path via your cmake command like so:
+3) Pass the location of the glslang install directory using an absolute path via your cmake command like so:
- cmake -DGLSLANG_REPO_ROOT=c:\absolute_path_to\glslang
-
-4) If building on Windows with MSVC, set `DISABLE_BUILDTGT_DIR_DECORATION` to _On_.
- If building on Windows, but without MSVC set `DISABLE_BUILD_PATH_DECORATION` to _On_
+ cmake -DGLSLANG_INSTALL_DIR=c:\absolute_path_to\glslang\build\install
## Optional software packages
set(SCRIPTS_DIR "${PROJECT_SOURCE_DIR}/scripts")
-if(NOT DEFINED GLSLANG_REPO_ROOT)
+
+if(DEFINED GLSLANG_INSTALL_DIR)
+ message(STATUS "Using GLSLANG_INSTALL_DIR to look for glslangValidator")
+ find_program(GLSLANG_VALIDATOR names glslangValidator
+ HINTS "${GLSLANG_INSTALL_DIR}/bin"
+ )
+elseif(DEFINED GLSLANG_REPO_ROOT)
+ message(STATUS "Using glslang_repo_root to look for glslangValidator")
+ find_program(GLSLANG_VALIDATOR names glslangValidator
+ HINTS "${GLSLANG_REPO_ROOT}/build/standalone/release"
+ HINTS "${GLSLANG_REPO_ROOT}/build/standalone/debug"
+ HINTS "${GLSLANG_REPO_ROOT}/build/StandAlone"
+ HINTS "${GLSLANG_REPO_ROOT}/dbuild/StandAlone"
+ HINTS "${GLSLANG_REPO_ROOT}/build32/standalone/release"
+ HINTS "${GLSLANG_REPO_ROOT}/build32/standalone/debug"
+ )
+else()
set(GLSLANG_VALIDATOR_NAME "glslangValidator")
message(STATUS "Using cmake find_program to look for glslangValidator")
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
find_program(GLSLANG_VALIDATOR NAMES ${GLSLANG_VALIDATOR_NAME}
HINTS "${PROJECT_SOURCE_DIR}/glslang/bin"
)
-else()
- message(STATUS "Using glslang_repo_root to look for glslangValidator")
- find_program(GLSLANG_VALIDATOR names glslangValidator
- HINTS "${GLSLANG_REPO_ROOT}/build/standalone/release"
- HINTS "${GLSLANG_REPO_ROOT}/build/standalone/debug"
- HINTS "${GLSLANG_REPO_ROOT}/build/StandAlone"
- HINTS "${GLSLANG_REPO_ROOT}/dbuild/StandAlone"
- HINTS "${GLSLANG_REPO_ROOT}/build32/standalone/release"
- HINTS "${GLSLANG_REPO_ROOT}/build32/standalone/debug"
- )
endif()
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")