Lines 19-54
foreach(type SHARED_LIBRARY SHARED_MODULE EXE)
Link Here
|
19 |
set(CMAKE_${type}_LINK_DYNAMIC_C_FLAGS "-Wl,-Bdynamic") |
19 |
set(CMAKE_${type}_LINK_DYNAMIC_C_FLAGS "-Wl,-Bdynamic") |
20 |
endforeach() |
20 |
endforeach() |
21 |
|
21 |
|
22 |
# Debian policy requires that shared libraries be installed without |
|
|
23 |
# executable permission. Fedora policy requires that shared libraries |
24 |
# be installed with the executable permission. Since the native tools |
25 |
# create shared libraries with execute permission in the first place a |
26 |
# reasonable policy seems to be to install with execute permission by |
27 |
# default. In order to support debian packages we provide an option |
28 |
# here. The option default is based on the current distribution, but |
29 |
# packagers can set it explicitly on the command line. |
30 |
if(DEFINED CMAKE_INSTALL_SO_NO_EXE) |
31 |
# Store the decision variable in the cache. This preserves any |
32 |
# setting the user provides on the command line. |
33 |
set(CMAKE_INSTALL_SO_NO_EXE "${CMAKE_INSTALL_SO_NO_EXE}" CACHE INTERNAL |
34 |
"Install .so files without execute permission.") |
35 |
else() |
36 |
# Store the decision variable as an internal cache entry to avoid |
37 |
# checking the platform every time. This option is advanced enough |
38 |
# that only package maintainers should need to adjust it. They are |
39 |
# capable of providing a setting on the command line. |
40 |
if(EXISTS "/etc/debian_version") |
41 |
set(CMAKE_INSTALL_SO_NO_EXE 1 CACHE INTERNAL |
42 |
"Install .so files without execute permission.") |
43 |
else() |
44 |
set(CMAKE_INSTALL_SO_NO_EXE 0 CACHE INTERNAL |
45 |
"Install .so files without execute permission.") |
46 |
endif() |
47 |
endif() |
48 |
|
49 |
# Match multiarch library directory names. |
22 |
# Match multiarch library directory names. |
50 |
set(CMAKE_LIBRARY_ARCHITECTURE_REGEX "[a-z0-9_]+(-[a-z0-9_]+)?-linux-gnu[a-z0-9_]*") |
23 |
set(CMAKE_LIBRARY_ARCHITECTURE_REGEX "[a-z0-9_]+(-[a-z0-9_]+)?-linux-gnu[a-z0-9_]*") |
51 |
|
24 |
|
|
|
25 |
include(Platform/Platform) |
52 |
include(Platform/UnixPaths) |
26 |
include(Platform/UnixPaths) |
53 |
|
27 |
|
54 |
# Debian has lib32 and lib64 paths only for compatibility so they should not be |
28 |
# Debian has lib32 and lib64 paths only for compatibility so they should not be |
55 |
- |
|
|
56 |
Platform.cmake |
29 |
Platform.cmake |
57 |
-- |
|
|
58 |
Modules/CMakeFindPackageMode.cmake | 3 ++- |
30 |
Modules/CMakeFindPackageMode.cmake | 3 ++- |
59 |
Modules/FindPkgConfig.cmake | 4 +++- |
31 |
Modules/FindPkgConfig.cmake | 4 +++- |
60 |
Modules/GNUInstallDirs.cmake | 6 ++++-- |
32 |
Modules/GNUInstallDirs.cmake | 6 ++++-- |
61 |
Modules/Platform/Linux.cmake | 2 +- |
33 |
Modules/Platform/Linux.cmake | 2 +- |
62 |
.../FindPkgConfig/FindPkgConfig_PKGCONFIG_PATH.cmake | 2 +- |
34 |
.../FindPkgConfig/FindPkgConfig_PKGCONFIG_PATH.cmake | 2 +- |
63 |
...PkgConfig_PKGCONFIG_PATH_NO_CMAKE_ENVIRONMENT_PATH.cmake | 2 +- |
35 |
...PkgConfig_PKGCONFIG_PATH_NO_CMAKE_ENVIRONMENT_PATH.cmake | 2 +- |
64 |
.../FindPkgConfig_PKGCONFIG_PATH_NO_CMAKE_PATH.cmake | 2 +- |
36 |
.../FindPkgConfig_PKGCONFIG_PATH_NO_CMAKE_PATH.cmake | 2 +- |
65 |
7 files changed, 13 insertions(+), 8 deletions(-) |
37 |
7 files changed, 13 insertions(+), 8 deletions(-) |