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
|
2019-08-07 07:52:20 +00:00
|
|
|
disassemble.h
|
|
|
|
GLSL.ext.AMD.h
|
2019-05-31 18:06:01 +00:00
|
|
|
GLSL.ext.NV.h
|
|
|
|
NonSemanticDebugPrintf.h)
|
2015-06-26 22:58:36 +00:00
|
|
|
|
2016-08-17 22:18:06 +00:00
|
|
|
set(SPVREMAP_HEADERS
|
|
|
|
SPVRemapper.h
|
|
|
|
doc.h)
|
|
|
|
|
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)
|
2019-11-21 15:33:32 +00:00
|
|
|
target_include_directories(SPIRV PUBLIC
|
2019-08-06 14:29:31 +00:00
|
|
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/..>
|
|
|
|
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
|
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)
|
2019-08-06 14:29:31 +00:00
|
|
|
target_include_directories(SPIRV PUBLIC
|
|
|
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../External>
|
|
|
|
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/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)
|
2019-08-06 13:47:51 +00:00
|
|
|
install(TARGETS SPVRemapper EXPORT SPVRemapperTargets
|
2018-07-07 21:53:06 +00:00
|
|
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
|
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
|
|
|
endif()
|
2019-08-06 13:47:51 +00:00
|
|
|
install(TARGETS SPIRV EXPORT SPIRVTargets
|
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)
|
2019-08-06 13:47:51 +00:00
|
|
|
install(TARGETS SPVRemapper EXPORT SPVRemapperTargets
|
2018-07-07 21:53:06 +00:00
|
|
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
|
|
|
endif()
|
2019-08-06 13:47:51 +00:00
|
|
|
install(TARGETS SPIRV EXPORT SPIRVTargets
|
2018-04-26 14:04:25 +00:00
|
|
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
|
|
|
endif()
|
2017-01-30 01:45:12 +00:00
|
|
|
|
2019-11-21 15:33:32 +00:00
|
|
|
if (ENABLE_SPVREMAPPER)
|
2019-11-22 13:24:38 +00:00
|
|
|
install(EXPORT SPVRemapperTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake)
|
2019-11-21 15:33:32 +00:00
|
|
|
endif()
|
|
|
|
|
2019-11-18 19:11:55 +00:00
|
|
|
install(EXPORT SPIRVTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake)
|
2019-11-06 01:05:42 +00:00
|
|
|
|
|
|
|
install(FILES ${HEADERS} ${SPVREMAP_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/SPIRV/)
|
2019-10-06 14:00:37 +00:00
|
|
|
install(FILES ${HEADERS} ${SPVREMAP_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/glslang/SPIRV/)
|
2017-07-04 13:00:35 +00:00
|
|
|
endif(ENABLE_GLSLANG_INSTALL)
|