summaryrefslogtreecommitdiffstats
path: root/ConfigureChecks.cmake
diff options
context:
space:
mode:
authorAlexander Golubev <fatzer2@gmail.com>2024-02-09 15:05:24 +0300
committerSlávek Banko <slavek.banko@axis.cz>2024-03-03 18:17:00 +0100
commitbfb0fce6a08db891a7722eff50d7d509bd8837c0 (patch)
treed8239c9071f2f9685d482eb8772d6fd8f26dc938 /ConfigureChecks.cmake
parent6b4ac1995d61357bbc3a506bc5436a01e332348d (diff)
downloadtdebase-bfb0fce6a08db891a7722eff50d7d509bd8837c0.tar.gz
tdebase-bfb0fce6a08db891a7722eff50d7d509bd8837c0.zip
cmake: use pkg_get_variable() to query pkg-config variables
Signed-off-by: Alexander Golubev <fatzer2@gmail.com> (cherry picked from commit 0713c2b1c84765d9d754ae8804968af43fd72be5)
Diffstat (limited to 'ConfigureChecks.cmake')
-rw-r--r--ConfigureChecks.cmake38
1 files changed, 8 insertions, 30 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
index ea441f447..12185432a 100644
--- a/ConfigureChecks.cmake
+++ b/ConfigureChecks.cmake
@@ -507,30 +507,16 @@ endif( )
if( BUILD_KXKB )
if( NOT X11_XKB_RULES_DIR )
- pkg_search_module( XKB_CONFIG xkeyboard-config )
- if( XKB_CONFIG_FOUND )
- execute_process(
- COMMAND ${PKG_CONFIG_EXECUTABLE} --variable=xkb_base xkeyboard-config
- OUTPUT_VARIABLE KB_RULES_DIR
- OUTPUT_STRIP_TRAILING_WHITESPACE
- )
- if( NOT "${KB_RULES_DIR}" STREQUAL "" )
- string(REGEX REPLACE "/xkb$" "/" X11_XKB_RULES_DIR "${KB_RULES_DIR}" )
- endif( )
+ pkg_get_variable( KB_RULES_DIR xkeyboard-config xkb_base )
+ if( KB_RULES_DIR )
+ string(REGEX REPLACE "/xkb$" "/" X11_XKB_RULES_DIR "${KB_RULES_DIR}" )
endif( )
endif( )
if( NOT X11_XKB_RULES_DIR )
- pkg_search_module( XKBCOMP xkbcomp )
- if( XKBCOMP_FOUND )
- execute_process(
- COMMAND ${PKG_CONFIG_EXECUTABLE} --variable=xkbconfigdir xkbcomp
- OUTPUT_VARIABLE KB_RULES_DIR
- OUTPUT_STRIP_TRAILING_WHITESPACE
- )
- if( NOT "${KB_RULES_DIR}" STREQUAL "" )
- string(REGEX REPLACE "/xkb$" "/" X11_XKB_RULES_DIR "${KB_RULES_DIR}" )
- endif( )
+ pkg_get_variable( KB_RULES_DIR xkbcomp xkbconfigdir )
+ if( KB_RULES_DIR )
+ string(REGEX REPLACE "/xkb$" "/" X11_XKB_RULES_DIR "${KB_RULES_DIR}" )
endif( )
endif( )
@@ -552,16 +538,8 @@ if( BUILD_KXKB )
endif( )
if( NOT X11_XKB_RULES_DIR )
- execute_process(
- COMMAND ${PKG_CONFIG_EXECUTABLE} --variable=libdir xkbfile
- OUTPUT_VARIABLE KB_RULES_LIBDIR
- OUTPUT_STRIP_TRAILING_WHITESPACE
- )
- execute_process(
- COMMAND ${PKG_CONFIG_EXECUTABLE} --variable=prefix xkbfile
- OUTPUT_VARIABLE KB_RULES_PREFIX
- OUTPUT_STRIP_TRAILING_WHITESPACE
- )
+ pkg_get_variable( KB_RULES_LIBDIR xkbfile libdir)
+ pkg_get_variable( KB_RULES_PREFIX xkbfile prefix)
if( KB_RULES_LIBDIR AND KB_RULES_PREFIX )
find_file( RULES_FILE
NAMES xorg xfree86