Findglslang.cmake 632 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
# Try to find glslang 
# Once done, this will define
# GLSLANG_FOUND
# GLSLANG_INCLUDE_DIR
# GLSLANG_LIBRARY
# 
# SPIRV_FOUND
# SPIRV_INCLUDE_DIR
# SPIRV_LIBRARIES

## GLSLANG core

find_path(GLSLANG_INCLUDE_DIR 
	NAMES glslang/Include/Common.h
	PATHS "${CMAKE_SOURCE_DIR}/"
		/home/
	DOC "GLSLANG Include Directory"
)

find_library(GLSLANG_LIBRARY
	NAMES glslang
	PATHS 	"${CMAKE_SOURCE_DIR}/"
		/usr/
		/home/
	DOC "GLSLANG Libraries"
)


IF (GLSLANG_LIBRARY AND GLSLANG_INCLUDE_DIR)
	SET(GLSLANG_FOUND TRUE)
ELSE(GLSLANG_LIBRARY AND GLSLANG_INCLUDE_DIR)
	SET(GLSLANG_FOUND FALSE)
ENDIF(GLSLANG_LIBRARY AND GLSLANG_INCLUDE_DIR)