aboutsummaryrefslogtreecommitdiff
path: root/cube
diff options
context:
space:
mode:
authorMark Lobodzinski <mark@lunarg.com>2018-05-22 08:40:49 -0600
committerMark Lobodzinski <mark@lunarg.com>2018-05-22 08:43:13 -0600
commitebda227dc0f9324907245bc46832389068459fd7 (patch)
tree11f6b6321ed49246778221fc285fc344974d7f8a /cube
parent3bd0e40e15672c32cf3fdda47e5bf971f80e4e8d (diff)
downloadusermoji-ebda227dc0f9324907245bc46832389068459fd7.tar.xz
cube: Change glslang location logic for INSTALL_DIR
Now respects GLSLANG_INSTALL_DIR, for instance, if Vulkan-Tools is a submodule of another repository. Also updated build doc.
Diffstat (limited to 'cube')
-rw-r--r--cube/CMakeLists.txt28
1 files changed, 17 insertions, 11 deletions
diff --git a/cube/CMakeLists.txt b/cube/CMakeLists.txt
index c90ab904..a6db96cc 100644
--- a/cube/CMakeLists.txt
+++ b/cube/CMakeLists.txt
@@ -8,7 +8,23 @@ set(PYTHON_CMD ${PYTHON_EXECUTABLE})
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")
@@ -22,16 +38,6 @@ if(NOT DEFINED GLSLANG_REPO_ROOT)
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")