cmake: Do not install static libraries in shared build mode.
The glslang cmake build system installs static libraries in addition to the dynamic glslang library, which are required when used in a package that uses glslang when calling find_package(). Distributions such as openSUSE (and perhaps others) use a "shared only" strategy, which conflicts with the current state of the glslang build system. The static libraries mentioned are already all included in glslang and thus not needed. With this commit, these will no longer install the associated cmake support files when glslang is built shared.
This commit is contained in:
@@ -41,7 +41,7 @@ if(WIN32)
|
||||
source_group("Source" FILES ${SOURCES})
|
||||
endif(WIN32)
|
||||
|
||||
if(ENABLE_GLSLANG_INSTALL)
|
||||
if(ENABLE_GLSLANG_INSTALL AND NOT BUILD_SHARED_LIBS)
|
||||
install(TARGETS OGLCompiler EXPORT glslang-targets)
|
||||
|
||||
# Backward compatibility
|
||||
@@ -56,4 +56,4 @@ if(ENABLE_GLSLANG_INSTALL)
|
||||
")
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/OGLCompilerTargets.cmake" DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake)
|
||||
|
||||
endif(ENABLE_GLSLANG_INSTALL)
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user