2016-06-26 05:06:20 +00:00
|
|
|
add_library(glslang-default-resource-limits
|
2018-06-02 07:26:43 +00:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/ResourceLimits.cpp)
|
2016-06-26 05:06:20 +00:00
|
|
|
set_property(TARGET glslang-default-resource-limits PROPERTY FOLDER glslang)
|
2018-06-02 07:26:43 +00:00
|
|
|
set_property(TARGET glslang-default-resource-limits PROPERTY POSITION_INDEPENDENT_CODE ON)
|
2016-06-26 05:06:20 +00:00
|
|
|
|
|
|
|
target_include_directories(glslang-default-resource-limits
|
2018-06-02 07:26:43 +00:00
|
|
|
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}
|
|
|
|
PUBLIC ${PROJECT_SOURCE_DIR})
|
2016-06-26 05:06:20 +00:00
|
|
|
|
2018-06-02 07:26:43 +00:00
|
|
|
set(SOURCES StandAlone.cpp DirStackFileIncluder.h)
|
2016-06-26 05:06:20 +00:00
|
|
|
set(REMAPPER_SOURCES spirv-remap.cpp)
|
|
|
|
|
|
|
|
add_executable(glslangValidator ${SOURCES})
|
|
|
|
add_executable(spirv-remap ${REMAPPER_SOURCES})
|
|
|
|
set_property(TARGET glslangValidator PROPERTY FOLDER tools)
|
|
|
|
set_property(TARGET spirv-remap PROPERTY FOLDER tools)
|
|
|
|
glslang_set_link_args(glslangValidator)
|
|
|
|
glslang_set_link_args(spirv-remap)
|
|
|
|
|
|
|
|
set(LIBRARIES
|
|
|
|
glslang
|
|
|
|
SPIRV
|
2018-06-02 07:26:43 +00:00
|
|
|
SPVRemapper
|
2016-06-26 05:06:20 +00:00
|
|
|
glslang-default-resource-limits)
|
|
|
|
|
|
|
|
if(WIN32)
|
|
|
|
set(LIBRARIES ${LIBRARIES} psapi)
|
|
|
|
elseif(UNIX)
|
|
|
|
if(NOT ANDROID)
|
|
|
|
set(LIBRARIES ${LIBRARIES} pthread)
|
|
|
|
endif()
|
|
|
|
endif(WIN32)
|
|
|
|
|
|
|
|
target_link_libraries(glslangValidator ${LIBRARIES})
|
|
|
|
target_link_libraries(spirv-remap ${LIBRARIES})
|
|
|
|
|
|
|
|
if(WIN32)
|
|
|
|
source_group("Source" FILES ${SOURCES})
|
|
|
|
endif(WIN32)
|
|
|
|
|
2018-06-02 07:26:43 +00:00
|
|
|
if(ENABLE_GLSLANG_INSTALL)
|
|
|
|
install(TARGETS glslangValidator
|
|
|
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
2016-06-26 05:06:20 +00:00
|
|
|
|
2018-06-02 07:26:43 +00:00
|
|
|
install(TARGETS spirv-remap
|
|
|
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
|
|
|
|
|
|
|
if(BUILD_SHARED_LIBS)
|
|
|
|
install(TARGETS glslang-default-resource-limits
|
|
|
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
|
|
|
endif()
|
|
|
|
endif(ENABLE_GLSLANG_INSTALL)
|