2016-06-26 05:06:20 +00:00
|
|
|
set(SOURCES
|
2018-06-02 07:26:43 +00:00
|
|
|
hlslAttributes.cpp
|
2016-06-26 05:06:20 +00:00
|
|
|
hlslParseHelper.cpp
|
|
|
|
hlslScanContext.cpp
|
|
|
|
hlslOpMap.cpp
|
|
|
|
hlslTokenStream.cpp
|
|
|
|
hlslGrammar.cpp
|
|
|
|
hlslParseables.cpp)
|
|
|
|
|
|
|
|
set(HEADERS
|
2018-06-02 07:26:43 +00:00
|
|
|
hlslAttributes.h
|
2016-06-26 05:06:20 +00:00
|
|
|
hlslParseHelper.h
|
|
|
|
hlslTokens.h
|
|
|
|
hlslScanContext.h
|
|
|
|
hlslOpMap.h
|
|
|
|
hlslTokenStream.h
|
|
|
|
hlslGrammar.h
|
|
|
|
hlslParseables.h)
|
|
|
|
|
2020-03-02 15:42:00 +00:00
|
|
|
glslang_pch(SOURCES pch.cpp)
|
|
|
|
|
2018-06-02 07:26:43 +00:00
|
|
|
add_library(HLSL ${LIB_TYPE} ${SOURCES} ${HEADERS})
|
2016-06-26 05:06:20 +00:00
|
|
|
set_property(TARGET HLSL PROPERTY FOLDER hlsl)
|
2018-06-02 07:26:43 +00:00
|
|
|
set_property(TARGET HLSL PROPERTY POSITION_INDEPENDENT_CODE ON)
|
|
|
|
|
|
|
|
if(WIN32 AND BUILD_SHARED_LIBS)
|
|
|
|
set_target_properties(HLSL PROPERTIES PREFIX "")
|
|
|
|
endif()
|
2016-06-26 05:06:20 +00:00
|
|
|
|
|
|
|
if(WIN32)
|
|
|
|
source_group("Source" FILES ${SOURCES} ${HEADERS})
|
|
|
|
endif(WIN32)
|
|
|
|
|
2018-06-02 07:26:43 +00:00
|
|
|
if(ENABLE_GLSLANG_INSTALL)
|
|
|
|
if(BUILD_SHARED_LIBS)
|
2020-03-02 15:42:00 +00:00
|
|
|
install(TARGETS HLSL EXPORT HLSLTargets
|
2018-06-02 07:26:43 +00:00
|
|
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
2020-03-02 15:42:00 +00:00
|
|
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
|
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
2018-06-02 07:26:43 +00:00
|
|
|
else()
|
2020-03-02 15:42:00 +00:00
|
|
|
install(TARGETS HLSL EXPORT HLSLTargets
|
2018-06-02 07:26:43 +00:00
|
|
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
|
|
|
endif()
|
2020-03-02 15:42:00 +00:00
|
|
|
install(EXPORT HLSLTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake)
|
2018-06-02 07:26:43 +00:00
|
|
|
endif(ENABLE_GLSLANG_INSTALL)
|