blob: 685a0cbda7f9eabc05ea553bd7ef5975b465ddf4 (
plain)
1 From 63927cbb24c80b0cad5829338a6f76da6a873beb Mon Sep 17 00:00:00 2001
2 From: Sandy Carter <bwrsandman@gmail.com>
3 Date: Sat, 16 Nov 2019 09:43:29 +0100
4 Subject: [PATCH 1/2] glslang: Rename and move cmake export
5
6 CMake when searching for a package in config mode will by default look for
7 a file called <name>Config.cmake or <lower-case-name>-config.cmake.
8 The previous naming would force the user to specify the name to
9 glslangTargets. The name is therefore changed to glslangConfig.cmake.
10
11 On Unix, cmake will look for the config files in the following directories:
12 <prefix>/(lib/<arch>|lib|share)/cmake/<name>*/ (U)
13 <prefix>/(lib/<arch>|lib|share)/<name>*/ (U)
14 <prefix>/(lib/<arch>|lib|share)/<name>*/(cmake|CMake)/ (U)
15 Previously the destination directory was <prefix>/lib/cmake which would not
16 be found.
17 The destination directory now includes the package name.
18
19 A namespace is added to be able to specify components.
20 ---
21 glslang/CMakeLists.txt | 7 ++++---
22 1 file changed, 4 insertions(+), 3 deletions(-)
23
24 diff --git a/glslang/CMakeLists.txt b/glslang/CMakeLists.txt
25 index 1c7d22a2..7408d81c 100644
26 --- a/glslang/CMakeLists.txt
27 +++ b/glslang/CMakeLists.txt
28 @@ -200,17 +200,18 @@ endif(WIN32)
29 if(ENABLE_GLSLANG_INSTALL)
30 if(BUILD_SHARED_LIBS)
31 install(TARGETS glslang
32 - EXPORT glslangTargets
33 + EXPORT glslangConfig
34 ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
35 LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
36 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
37 else()
38 install(TARGETS glslang MachineIndependent GenericCodeGen
39 - EXPORT glslangTargets
40 + EXPORT glslangConfig
41 ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
42 endif()
43
44 - install(EXPORT glslangTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake)
45 + install(EXPORT glslangConfig NAMESPACE glslang::
46 + DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/glslang)
47
48 set(ALL_HEADERS
49 ${GLSLANG_HEADERS}
50 --
51 2.28.0
|