From 83165737498868621ed1ad36d958b7f756b46529 Mon Sep 17 00:00:00 2001 From: Hugo Amnov Date: Sat, 21 Mar 2020 15:39:51 +0100 Subject: [PATCH] Do not automatically build broken SHARED library glslang automatically sets SHARED library type upon detection of `BUILD_SHARED_LIBS` setting, whereas glslang can't actually build as SHARED library (many build errors that no one seems interested to fix in the short term) It does not make sense that glslang therefore choses SHARED library type when CMake `BUILD_SHARED_LIBS` global setting is on. This breaks the builds of a project embedding glslang that would like to use the `BUILD_SHARED_LIBS` setting. The proper behavior is to actually always pass STATIC for glslang libraries until glslang can actually build as SHARED (maybe one day) --- CMakeLists.txt | 4 ---- 1 file changed, 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a80cd5f92f..f2e51a7b03 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,10 +20,6 @@ option(BUILD_EXTERNAL "Build external dependencies in /External" ON) set(LIB_TYPE STATIC) -if(BUILD_SHARED_LIBS) - set(LIB_TYPE SHARED) -endif() - option(SKIP_GLSLANG_INSTALL "Skip installation" ${SKIP_GLSLANG_INSTALL}) if(NOT ${SKIP_GLSLANG_INSTALL}) set(ENABLE_GLSLANG_INSTALL ON)