2015-06-26 22:58:36 +00:00
|
|
|
set(SOURCES
|
|
|
|
GlslangToSpv.cpp
|
2016-01-18 21:18:37 +00:00
|
|
|
InReadableOrder.cpp
|
2016-05-04 19:55:59 +00:00
|
|
|
Logger.cpp
|
2015-06-26 22:58:36 +00:00
|
|
|
SpvBuilder.cpp
|
|
|
|
doc.cpp
|
|
|
|
disassemble.cpp)
|
|
|
|
|
2016-08-17 22:18:06 +00:00
|
|
|
set(SPVREMAP_SOURCES
|
|
|
|
SPVRemapper.cpp
|
|
|
|
doc.cpp)
|
|
|
|
|
2015-06-26 22:58:36 +00:00
|
|
|
set(HEADERS
|
Parser: Implement extension GL_AMD_gpu_shader_half_float.
- Add built-in types: float16_t, f16vec, f16mat.
- Add support of half float constant: hf, HF.
- Extend built-in floating-point operators: +, -, *, /, ++, --, +=, -=,
*=, /=, ==, !=, >=, <=, >, <.
- Add support of type conversions: float16_t -> XXX, XXX -> float16_t.
- Add new built-in functions.
2016-07-29 08:00:05 +00:00
|
|
|
bitutils.h
|
2015-08-07 04:53:06 +00:00
|
|
|
spirv.hpp
|
|
|
|
GLSL.std.450.h
|
2018-03-02 09:42:37 +00:00
|
|
|
GLSL.ext.EXT.h
|
2016-09-21 10:56:12 +00:00
|
|
|
GLSL.ext.KHR.h
|
2015-06-26 22:58:36 +00:00
|
|
|
GlslangToSpv.h
|
Parser: Implement extension GL_AMD_gpu_shader_half_float.
- Add built-in types: float16_t, f16vec, f16mat.
- Add support of half float constant: hf, HF.
- Extend built-in floating-point operators: +, -, *, /, ++, --, +=, -=,
*=, /=, ==, !=, >=, <=, >, <.
- Add support of type conversions: float16_t -> XXX, XXX -> float16_t.
- Add new built-in functions.
2016-07-29 08:00:05 +00:00
|
|
|
hex_float.h
|
2016-05-04 19:55:59 +00:00
|
|
|
Logger.h
|
2015-06-26 22:58:36 +00:00
|
|
|
SpvBuilder.h
|
|
|
|
spvIR.h
|
|
|
|
doc.h
|
|
|
|
disassemble.h)
|
|
|
|
|
2016-08-17 22:18:06 +00:00
|
|
|
set(SPVREMAP_HEADERS
|
|
|
|
SPVRemapper.h
|
|
|
|
doc.h)
|
|
|
|
|
2016-05-05 04:30:44 +00:00
|
|
|
if(ENABLE_AMD_EXTENSIONS)
|
Parser: Implement extension GL_AMD_gpu_shader_half_float.
- Add built-in types: float16_t, f16vec, f16mat.
- Add support of half float constant: hf, HF.
- Extend built-in floating-point operators: +, -, *, /, ++, --, +=, -=,
*=, /=, ==, !=, >=, <=, >, <.
- Add support of type conversions: float16_t -> XXX, XXX -> float16_t.
- Add new built-in functions.
2016-07-29 08:00:05 +00:00
|
|
|
list(APPEND
|
|
|
|
HEADERS
|
|
|
|
GLSL.ext.AMD.h)
|
2016-05-05 04:30:44 +00:00
|
|
|
endif(ENABLE_AMD_EXTENSIONS)
|
|
|
|
|
2016-12-20 00:29:34 +00:00
|
|
|
if(ENABLE_NV_EXTENSIONS)
|
2017-01-24 06:24:21 +00:00
|
|
|
list(APPEND
|
|
|
|
HEADERS
|
|
|
|
GLSL.ext.NV.h)
|
2016-12-20 00:29:34 +00:00
|
|
|
endif(ENABLE_NV_EXTENSIONS)
|
|
|
|
|
2018-03-30 14:32:03 +00:00
|
|
|
add_library(SPIRV ${LIB_TYPE} ${SOURCES} ${HEADERS})
|
2017-07-04 14:53:45 +00:00
|
|
|
set_property(TARGET SPIRV PROPERTY FOLDER glslang)
|
|
|
|
set_property(TARGET SPIRV PROPERTY POSITION_INDEPENDENT_CODE ON)
|
2015-06-26 22:58:36 +00:00
|
|
|
|
2018-03-30 14:32:03 +00:00
|
|
|
add_library(SPVRemapper ${LIB_TYPE} ${SPVREMAP_SOURCES} ${SPVREMAP_HEADERS})
|
2017-07-04 14:53:45 +00:00
|
|
|
set_property(TARGET SPVRemapper PROPERTY FOLDER glslang)
|
|
|
|
set_property(TARGET SPVRemapper PROPERTY POSITION_INDEPENDENT_CODE ON)
|
2016-08-17 22:18:06 +00:00
|
|
|
|
2018-03-30 14:32:03 +00:00
|
|
|
if(WIN32 AND BUILD_SHARED_LIBS)
|
|
|
|
set_target_properties(SPIRV PROPERTIES PREFIX "")
|
|
|
|
set_target_properties(SPVRemapper PROPERTIES PREFIX "")
|
|
|
|
endif()
|
|
|
|
|
2017-09-21 22:50:39 +00:00
|
|
|
if(ENABLE_OPT)
|
|
|
|
target_include_directories(SPIRV
|
|
|
|
PRIVATE ${spirv-tools_SOURCE_DIR}/include
|
|
|
|
PRIVATE ${spirv-tools_SOURCE_DIR}/source
|
|
|
|
)
|
2018-03-26 23:20:10 +00:00
|
|
|
target_link_libraries(SPIRV glslang SPIRV-Tools-opt)
|
2017-09-21 22:50:39 +00:00
|
|
|
else()
|
|
|
|
target_link_libraries(SPIRV glslang)
|
|
|
|
endif(ENABLE_OPT)
|
|
|
|
|
2015-06-26 22:58:36 +00:00
|
|
|
if(WIN32)
|
|
|
|
source_group("Source" FILES ${SOURCES} ${HEADERS})
|
2016-08-17 22:18:06 +00:00
|
|
|
source_group("Source" FILES ${SPVREMAP_SOURCES} ${SPVREMAP_HEADERS})
|
2015-06-26 22:58:36 +00:00
|
|
|
endif(WIN32)
|
|
|
|
|
2017-07-04 13:00:35 +00:00
|
|
|
if(ENABLE_GLSLANG_INSTALL)
|
|
|
|
install(TARGETS SPIRV SPVRemapper
|
|
|
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
2017-01-30 01:45:12 +00:00
|
|
|
|
2017-07-04 13:00:35 +00:00
|
|
|
install(FILES ${HEADERS} ${SPVREMAP_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/SPIRV/)
|
|
|
|
endif(ENABLE_GLSLANG_INSTALL)
|