diff options
author | Kyle Edwards <kyle.edwards@kitware.com> | 2023-07-24 21:10:28 (GMT) |
---|---|---|
committer | Kyle Edwards <kyle.edwards@kitware.com> | 2023-07-24 21:23:32 (GMT) |
commit | f73a5bfaa9e75abb74e24d823847ba6fd57fc5f5 (patch) | |
tree | ac846b2ba97a7e755e10424d1eef084c7ce9680c /Modules/UsePkgConfig.cmake | |
parent | 17bab9e7090cb804f86fc0d62d100e25745232c4 (diff) | |
download | CMake-f73a5bfaa9e75abb74e24d823847ba6fd57fc5f5.zip CMake-f73a5bfaa9e75abb74e24d823847ba6fd57fc5f5.tar.gz CMake-f73a5bfaa9e75abb74e24d823847ba6fd57fc5f5.tar.bz2 |
UsePkgConfig: Replace exec_program() with execute_process()
Diffstat (limited to 'Modules/UsePkgConfig.cmake')
-rw-r--r-- | Modules/UsePkgConfig.cmake | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Modules/UsePkgConfig.cmake b/Modules/UsePkgConfig.cmake index 32d228d..b020259 100644 --- a/Modules/UsePkgConfig.cmake +++ b/Modules/UsePkgConfig.cmake @@ -35,25 +35,25 @@ macro(PKGCONFIG _package _include_DIR _link_DIR _link_FLAGS _cflags) # if pkg-config has been found if(PKGCONFIG_EXECUTABLE) - exec_program(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --exists RETURN_VALUE _return_VALUE OUTPUT_VARIABLE _pkgconfigDevNull ) + execute_process(COMMAND ${PKGCONFIG_EXECUTABLE} ${_package} --exists RESULT_VARIABLE _return_VALUE OUTPUT_VARIABLE _pkgconfigDevNull ) # and if the package of interest also exists for pkg-config, then get the information if(NOT _return_VALUE) - exec_program(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --variable=includedir + execute_process(COMMAND ${PKGCONFIG_EXECUTABLE} ${_package} --variable=includedir OUTPUT_VARIABLE ${_include_DIR} ) string(REGEX REPLACE "[\r\n]" " " ${_include_DIR} "${${_include_DIR}}") - exec_program(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --variable=libdir + execute_process(COMMAND ${PKGCONFIG_EXECUTABLE} ${_package} --variable=libdir OUTPUT_VARIABLE ${_link_DIR} ) string(REGEX REPLACE "[\r\n]" " " ${_link_DIR} "${${_link_DIR}}") - exec_program(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --libs + execute_process(COMMAND ${PKGCONFIG_EXECUTABLE} ${_package} --libs OUTPUT_VARIABLE ${_link_FLAGS} ) string(REGEX REPLACE "[\r\n]" " " ${_link_FLAGS} "${${_link_FLAGS}}") - exec_program(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --cflags + execute_process(COMMAND ${PKGCONFIG_EXECUTABLE} ${_package} --cflags OUTPUT_VARIABLE ${_cflags} ) string(REGEX REPLACE "[\r\n]" " " ${_cflags} "${${_cflags}}") |