John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1 | set(SOURCES |
| 2 | GlslangToSpv.cpp |
Dejan Mircevski | 44bfb0d | 2016-01-18 16:18:37 -0500 | [diff] [blame] | 3 | InReadableOrder.cpp |
Lei Zhang | 17535f7 | 2016-05-04 15:55:59 -0400 | [diff] [blame] | 4 | Logger.cpp |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 5 | SpvBuilder.cpp |
John Kessenich | f04c51b | 2018-08-03 15:56:12 -0600 | [diff] [blame] | 6 | SpvPostProcess.cpp |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 7 | doc.cpp |
John Kessenich | 717c80a | 2018-08-23 15:17:10 -0600 | [diff] [blame] | 8 | SpvTools.cpp |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 9 | disassemble.cpp) |
| 10 | |
steve-lunarg | a845641 | 2016-08-17 16:18:06 -0600 | [diff] [blame] | 11 | set(SPVREMAP_SOURCES |
| 12 | SPVRemapper.cpp |
| 13 | doc.cpp) |
| 14 | |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 15 | set(HEADERS |
Rex Xu | c9e3c3c | 2016-07-29 16:00:05 +0800 | [diff] [blame] | 16 | bitutils.h |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 17 | spirv.hpp |
| 18 | GLSL.std.450.h |
Rex Xu | 81f4c03 | 2018-03-02 17:42:37 +0800 | [diff] [blame] | 19 | GLSL.ext.EXT.h |
Rex Xu | 5159664 | 2016-09-21 18:56:12 +0800 | [diff] [blame] | 20 | GLSL.ext.KHR.h |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 21 | GlslangToSpv.h |
Rex Xu | c9e3c3c | 2016-07-29 16:00:05 +0800 | [diff] [blame] | 22 | hex_float.h |
Lei Zhang | 17535f7 | 2016-05-04 15:55:59 -0400 | [diff] [blame] | 23 | Logger.h |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 24 | SpvBuilder.h |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 25 | spvIR.h |
| 26 | doc.h |
John Kessenich | 717c80a | 2018-08-23 15:17:10 -0600 | [diff] [blame] | 27 | SpvTools.h |
John Kessenich | eaf4496 | 2019-08-07 01:52:20 -0600 | [diff] [blame] | 28 | disassemble.h |
| 29 | GLSL.ext.AMD.h |
| 30 | GLSL.ext.NV.h) |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 31 | |
steve-lunarg | a845641 | 2016-08-17 16:18:06 -0600 | [diff] [blame] | 32 | set(SPVREMAP_HEADERS |
| 33 | SPVRemapper.h |
| 34 | doc.h) |
| 35 | |
Matthew Albrecht | 6c5f649 | 2018-03-30 09:32:03 -0500 | [diff] [blame] | 36 | add_library(SPIRV ${LIB_TYPE} ${SOURCES} ${HEADERS}) |
Rohith Chandran | 6206091 | 2017-07-04 10:53:45 -0400 | [diff] [blame] | 37 | set_property(TARGET SPIRV PROPERTY FOLDER glslang) |
| 38 | set_property(TARGET SPIRV PROPERTY POSITION_INDEPENDENT_CODE ON) |
Michael Maltese | a895f37 | 2017-05-02 16:16:06 -0700 | [diff] [blame] | 39 | target_include_directories(SPIRV PUBLIC ..) |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 40 | |
Matthew Albrecht | 857f25c | 2018-07-07 16:53:06 -0500 | [diff] [blame] | 41 | if (ENABLE_SPVREMAPPER) |
| 42 | add_library(SPVRemapper ${LIB_TYPE} ${SPVREMAP_SOURCES} ${SPVREMAP_HEADERS}) |
| 43 | set_property(TARGET SPVRemapper PROPERTY FOLDER glslang) |
| 44 | set_property(TARGET SPVRemapper PROPERTY POSITION_INDEPENDENT_CODE ON) |
| 45 | endif() |
steve-lunarg | a845641 | 2016-08-17 16:18:06 -0600 | [diff] [blame] | 46 | |
Matthew Albrecht | 6c5f649 | 2018-03-30 09:32:03 -0500 | [diff] [blame] | 47 | if(WIN32 AND BUILD_SHARED_LIBS) |
| 48 | set_target_properties(SPIRV PROPERTIES PREFIX "") |
Matthew Albrecht | 857f25c | 2018-07-07 16:53:06 -0500 | [diff] [blame] | 49 | if (ENABLE_SPVREMAPPER) |
| 50 | set_target_properties(SPVRemapper PROPERTIES PREFIX "") |
| 51 | endif() |
Matthew Albrecht | 6c5f649 | 2018-03-30 09:32:03 -0500 | [diff] [blame] | 52 | endif() |
| 53 | |
GregF | fd34f0e | 2017-09-21 16:50:39 -0600 | [diff] [blame] | 54 | if(ENABLE_OPT) |
| 55 | target_include_directories(SPIRV |
| 56 | PRIVATE ${spirv-tools_SOURCE_DIR}/include |
| 57 | PRIVATE ${spirv-tools_SOURCE_DIR}/source |
| 58 | ) |
GregF | 4bede9e | 2018-03-26 17:20:10 -0600 | [diff] [blame] | 59 | target_link_libraries(SPIRV glslang SPIRV-Tools-opt) |
John Kessenich | e215622 | 2018-06-11 18:12:15 -0600 | [diff] [blame] | 60 | target_include_directories(SPIRV PUBLIC ../External) |
GregF | fd34f0e | 2017-09-21 16:50:39 -0600 | [diff] [blame] | 61 | else() |
| 62 | target_link_libraries(SPIRV glslang) |
| 63 | endif(ENABLE_OPT) |
| 64 | |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 65 | if(WIN32) |
| 66 | source_group("Source" FILES ${SOURCES} ${HEADERS}) |
steve-lunarg | a845641 | 2016-08-17 16:18:06 -0600 | [diff] [blame] | 67 | source_group("Source" FILES ${SPVREMAP_SOURCES} ${SPVREMAP_HEADERS}) |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 68 | endif(WIN32) |
| 69 | |
d3x0r | 4e53d90 | 2017-07-04 06:00:35 -0700 | [diff] [blame] | 70 | if(ENABLE_GLSLANG_INSTALL) |
Matthew Albrecht | 1199cf9 | 2018-04-26 09:04:25 -0500 | [diff] [blame] | 71 | if(BUILD_SHARED_LIBS) |
Matthew Albrecht | 857f25c | 2018-07-07 16:53:06 -0500 | [diff] [blame] | 72 | if (ENABLE_SPVREMAPPER) |
| 73 | install(TARGETS SPVRemapper |
| 74 | ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} |
| 75 | LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) |
| 76 | endif() |
| 77 | install(TARGETS SPIRV |
Matthew Albrecht | 1199cf9 | 2018-04-26 09:04:25 -0500 | [diff] [blame] | 78 | ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} |
Matthew Albrecht | cda52d5 | 2019-05-23 19:01:57 -0500 | [diff] [blame] | 79 | LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} |
| 80 | RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) |
Matthew Albrecht | 1199cf9 | 2018-04-26 09:04:25 -0500 | [diff] [blame] | 81 | else() |
Matthew Albrecht | 857f25c | 2018-07-07 16:53:06 -0500 | [diff] [blame] | 82 | if (ENABLE_SPVREMAPPER) |
| 83 | install(TARGETS SPVRemapper |
| 84 | ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) |
| 85 | endif() |
| 86 | install(TARGETS SPIRV |
Matthew Albrecht | 1199cf9 | 2018-04-26 09:04:25 -0500 | [diff] [blame] | 87 | ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) |
| 88 | endif() |
Benjamin Saunders | 5a07453 | 2017-01-29 17:45:12 -0800 | [diff] [blame] | 89 | |
d3x0r | 4e53d90 | 2017-07-04 06:00:35 -0700 | [diff] [blame] | 90 | install(FILES ${HEADERS} ${SPVREMAP_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/SPIRV/) |
| 91 | endif(ENABLE_GLSLANG_INSTALL) |