bgfx/3rdparty/glslang/hlsl/CMakeLists.txt

28 lines
1017 B
CMake
Raw Normal View History

2016-12-16 01:19:54 +03:00
2020-06-19 07:45:42 +03:00
# The HLSL source is directly embedded into the glslang target when ENABLE_HLSL
# is set.
# This source now lives at: glslang/HLSL/
# The HLSL target is now just a stub that exists for backwards compatibility for
# projects that referenced this target.
2016-12-16 01:19:54 +03:00
2020-06-19 07:45:42 +03:00
add_library(HLSL ${LIB_TYPE} "stub.cpp")
2017-07-08 07:19:36 +03:00
set_property(TARGET HLSL PROPERTY FOLDER hlsl)
set_property(TARGET HLSL PROPERTY POSITION_INDEPENDENT_CODE ON)
2016-12-16 01:19:54 +03:00
2018-04-14 05:31:28 +03:00
if(WIN32 AND BUILD_SHARED_LIBS)
set_target_properties(HLSL PROPERTIES PREFIX "")
endif()
2017-07-08 07:19:36 +03:00
if(ENABLE_GLSLANG_INSTALL)
2018-05-05 05:56:50 +03:00
if(BUILD_SHARED_LIBS)
2019-10-20 08:28:32 +03:00
install(TARGETS HLSL EXPORT HLSLTargets
2018-05-05 05:56:50 +03:00
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
2019-06-07 08:11:01 +03:00
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
2018-05-05 05:56:50 +03:00
else()
2019-10-20 08:28:32 +03:00
install(TARGETS HLSL EXPORT HLSLTargets
2018-05-05 05:56:50 +03:00
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()
2019-11-24 05:09:22 +03:00
install(EXPORT HLSLTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake)
2017-07-08 07:19:36 +03:00
endif(ENABLE_GLSLANG_INSTALL)