Merge pull request #3028 from rhabacker/fix-shared-build-mode
cmake: Do not install static libraries in shared build mode
This commit is contained in:
commit
1846ead23b
@ -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()
|
||||
|
||||
@ -201,6 +201,7 @@ endif()
|
||||
################################################################################
|
||||
if(ENABLE_GLSLANG_INSTALL)
|
||||
install(TARGETS glslang EXPORT glslang-targets)
|
||||
if(NOT BUILD_SHARED_LIBS)
|
||||
install(TARGETS MachineIndependent EXPORT glslang-targets)
|
||||
install(TARGETS GenericCodeGen EXPORT glslang-targets)
|
||||
|
||||
@ -221,6 +222,7 @@ if(ENABLE_GLSLANG_INSTALL)
|
||||
endif()
|
||||
")
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/glslangTargets.cmake" DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake)
|
||||
endif()
|
||||
|
||||
set(ALL_HEADERS
|
||||
${GLSLANG_HEADERS}
|
||||
|
||||
@ -52,7 +52,7 @@ else()
|
||||
target_link_libraries(OSDependent Threads::Threads)
|
||||
endif()
|
||||
|
||||
if(ENABLE_GLSLANG_INSTALL)
|
||||
if(ENABLE_GLSLANG_INSTALL AND NOT BUILD_SHARED_LIBS)
|
||||
install(TARGETS OSDependent EXPORT glslang-targets)
|
||||
|
||||
# Backward compatibility
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user