summaryrefslogtreecommitdiffstats
path: root/ConfigureChecks.cmake
diff options
context:
space:
mode:
authorAlexander Golubev <[email protected]>2024-02-09 15:05:24 +0300
committerTDE Gitea <[email protected]>2024-03-03 17:14:21 +0000
commit0713c2b1c84765d9d754ae8804968af43fd72be5 (patch)
tree36259466d0647d67574320b5a16a73c8dadd2f72 /ConfigureChecks.cmake
parentbf3ffaced316838216ed076b01730299755cda2b (diff)
downloadtdebase-0713c2b1c84765d9d754ae8804968af43fd72be5.tar.gz
tdebase-0713c2b1c84765d9d754ae8804968af43fd72be5.zip
cmake: use pkg_get_variable() to query pkg-config variables
Signed-off-by: Alexander Golubev <[email protected]>
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