build: install glslang-config.cmake to libdir
As glslang ships architecture dependant files, the Config file should be installed to libdir, not datadir. See https://github.com/KhronosGroup/glslang/pull/2989#discussion_r955367103 for more details. Here's the diff between the install tree before and after this patch: $ diff <(tree install-datadir) <(tree install) 1c1 < install-datadir --- > install 74,99c74,98 < ├── lib < │ ├── cmake < │ │ ├── glslang-default-resource-limitsTargets.cmake < │ │ ├── glslangTargets.cmake < │ │ ├── glslangValidatorTargets.cmake < │ │ ├── HLSLTargets.cmake < │ │ ├── OGLCompilerTargets.cmake < │ │ ├── OSDependentTargets.cmake < │ │ ├── spirv-remapTargets.cmake < │ │ ├── SPIRVTargets.cmake < │ │ └── SPVRemapperTargets.cmake < │ ├── libGenericCodeGen.a < │ ├── libglslang.a < │ ├── libglslang-default-resource-limits.a < │ ├── libHLSL.a < │ ├── libMachineIndependent.a < │ ├── libOGLCompiler.a < │ ├── libOSDependent.a < │ ├── libSPIRV.a < │ └── libSPVRemapper.a < └── share < └── glslang < ├── glslang-config.cmake < ├── glslang-config-version.cmake < ├── glslang-targets.cmake < └── glslang-targets-debug.cmake --- > └── lib > ├── cmake > │ ├── glslang-default-resource-limitsTargets.cmake > │ ├── glslangTargets.cmake > │ ├── glslangValidatorTargets.cmake > │ ├── HLSLTargets.cmake > │ ├── OGLCompilerTargets.cmake > │ ├── OSDependentTargets.cmake > │ ├── spirv-remapTargets.cmake > │ ├── SPIRVTargets.cmake > │ └── SPVRemapperTargets.cmake > ├── glslang > │ ├── glslang-config.cmake > │ ├── glslang-config-version.cmake > │ ├── glslang-targets.cmake > │ └── glslang-targets-debug.cmake > ├── libGenericCodeGen.a > ├── libglslang.a > ├── libglslang-default-resource-limits.a > ├── libHLSL.a > ├── libMachineIndependent.a > ├── libOGLCompiler.a > ├── libOSDependent.a > ├── libSPIRV.a > └── libSPVRemapper.a 101c100 < 15 directories, 83 files --- > 14 directories, 83 files
This commit is contained in:
@@ -111,7 +111,7 @@ if(ENABLE_GLSLANG_INSTALL)
|
||||
message(WARNING \"Using `glslangValidatorTargets.cmake` is deprecated: use `find_package(glslang)` to find glslang CMake targets.\")
|
||||
|
||||
if (NOT TARGET glslang::glslangValidator)
|
||||
include(\"\${CMAKE_CURRENT_LIST_DIR}/../../${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}/glslang-targets.cmake\")
|
||||
include(\"\${CMAKE_CURRENT_LIST_DIR}/../../${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}/glslang-targets.cmake\")
|
||||
endif()
|
||||
|
||||
add_library(glslangValidator ALIAS glslang::glslangValidator)
|
||||
@@ -126,7 +126,7 @@ if(ENABLE_GLSLANG_INSTALL)
|
||||
message(WARNING \"Using `spirv-remapTargets.cmake` is deprecated: use `find_package(glslang)` to find glslang CMake targets.\")
|
||||
|
||||
if (NOT TARGET glslang::spirv-remap)
|
||||
include(\"\${CMAKE_CURRENT_LIST_DIR}/../../${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}/glslang-targets.cmake\")
|
||||
include(\"\${CMAKE_CURRENT_LIST_DIR}/../../${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}/glslang-targets.cmake\")
|
||||
endif()
|
||||
|
||||
add_library(spirv-remap ALIAS glslang::spirv-remap)
|
||||
@@ -141,7 +141,7 @@ if(ENABLE_GLSLANG_INSTALL)
|
||||
message(WARNING \"Using `glslang-default-resource-limitsTargets.cmake` is deprecated: use `find_package(glslang)` to find glslang CMake targets.\")
|
||||
|
||||
if (NOT TARGET glslang::glslang-default-resource-limits)
|
||||
include(\"\${CMAKE_CURRENT_LIST_DIR}/../../${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}/glslang-targets.cmake\")
|
||||
include(\"\${CMAKE_CURRENT_LIST_DIR}/../../${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}/glslang-targets.cmake\")
|
||||
endif()
|
||||
|
||||
add_library(glslang-default-resource-limits ALIAS glslang::glslang-default-resource-limits)
|
||||
|
||||
Reference in New Issue
Block a user