Allow external control of whether Glslang will be tested or installed

Expose GLSLANG__TESTS and GLSLANG_ENABLE_INSTALL as options
that can be controlled from an enclosing project, or from the
command line.

They retain the prior default behaviour. In particular, if Glslang
is not the top level project, then they default to OFF.

Fixes: #3507
This commit is contained in:
David Neto 2024-02-12 21:53:15 +00:00 committed by arcady-lunarg
parent 47a02a987c
commit b4a6efcda2
6 changed files with 62 additions and 49 deletions

View file

@ -40,6 +40,6 @@ set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)
target_link_libraries(OSDependent Threads::Threads)
if(PROJECT_IS_TOP_LEVEL AND NOT BUILD_SHARED_LIBS)
if(GLSLANG_ENABLE_INSTALL AND NOT BUILD_SHARED_LIBS)
install(TARGETS OSDependent EXPORT glslang-targets)
endif()