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
|
2018-08-03 21:56:12 +00:00
|
|
|
SpvPostProcess.cpp
|
2015-06-26 22:58:36 +00:00
|
|
|
doc.cpp
|
2018-08-23 21:17:10 +00:00
|
|
|
SpvTools.cpp
|
2015-06-26 22:58:36 +00:00
|
|
|
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
|
2018-08-23 21:17:10 +00:00
|
|
|
SpvTools.h
|
2015-06-26 22:58:36 +00:00
|
|
|
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)
|
2017-05-02 23:16:06 +00:00
|
|
|
target_include_directories(SPIRV PUBLIC ..)
|
2015-06-26 22:58:36 +00:00
|
|
|
|
2018-07-07 21:53:06 +00:00
|
|
|
if (ENABLE_SPVREMAPPER)
|
|
|
|
add_library(SPVRemapper ${LIB_TYPE} ${SPVREMAP_SOURCES} ${SPVREMAP_HEADERS})
|
|
|
|
set_property(TARGET SPVRemapper PROPERTY FOLDER glslang)
|
|
|
|
set_property(TARGET SPVRemapper PROPERTY POSITION_INDEPENDENT_CODE ON)
|
|
|
|
endif()
|
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 "")
|
2018-07-07 21:53:06 +00:00
|
|
|
if (ENABLE_SPVREMAPPER)
|
|
|
|
set_target_properties(SPVRemapper PROPERTIES PREFIX "")
|
|
|
|
endif()
|
2018-03-30 14:32:03 +00:00
|
|
|
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)
|
2018-06-12 00:12:15 +00:00
|
|
|
target_include_directories(SPIRV PUBLIC ../External)
|
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)
|
2018-04-26 14:04:25 +00:00
|
|
|
if(BUILD_SHARED_LIBS)
|
2018-07-07 21:53:06 +00:00
|
|
|
if (ENABLE_SPVREMAPPER)
|
|
|
|
install(TARGETS SPVRemapper
|
|
|
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
|
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
|
|
|
endif()
|
|
|
|
install(TARGETS SPIRV
|
2018-04-26 14:04:25 +00:00
|
|
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
2019-05-24 00:01:57 +00:00
|
|
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
|
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
2018-04-26 14:04:25 +00:00
|
|
|
else()
|
2018-07-07 21:53:06 +00:00
|
|
|
if (ENABLE_SPVREMAPPER)
|
|
|
|
install(TARGETS SPVRemapper
|
|
|
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
|
|
|
endif()
|
|
|
|
install(TARGETS SPIRV
|
2018-04-26 14:04:25 +00:00
|
|
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
|
|
|
endif()
|
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)
|