Use CMAKE_INSTALL_FULL_LIBDIR in compat cmake files
According to
https://cmake.org/cmake/help/v3.25/module/GNUInstallDirs.html,
CMAKE_INSTALL_LIBDIR can be an absolute path. For instance, Nixpkgs
[defined it to an absolute path in /nix/store](3d17b4c305/pkgs/development/tools/build-managers/cmake/setup-hook.sh (L101)).
The output in this case is:
# result-glslang/lib/cmake/glslangTargets.cmake:5
include("${CMAKE_CURRENT_LIST_DIR}/../..//nix/store/3mif2zibig0cilk5dbz334278n0vlq9s-glslang-1.3.231.0/lib/glslang/glslang-targets.cmake")
Signed-off-by: Chuang Zhu <git@chuang.cz>
This commit is contained in:
committed by
arcady-lunarg
parent
9c7fd1a33e
commit
dfc97740ff
@@ -49,7 +49,7 @@ if(ENABLE_GLSLANG_INSTALL AND NOT BUILD_SHARED_LIBS)
|
||||
message(WARNING \"Using `OGLCompilerTargets.cmake` is deprecated: use `find_package(glslang)` to find glslang CMake targets.\")
|
||||
|
||||
if (NOT TARGET glslang::OGLCompiler)
|
||||
include(\"\${CMAKE_CURRENT_LIST_DIR}/../../${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}/glslang-targets.cmake\")
|
||||
include(\"${CMAKE_INSTALL_FULL_LIBDIR}/cmake/${PROJECT_NAME}/glslang-targets.cmake\")
|
||||
endif()
|
||||
|
||||
add_library(OGLCompiler ALIAS glslang::OGLCompiler)
|
||||
|
||||
Reference in New Issue
Block a user