summaryrefslogtreecommitdiff
path: root/Modules/UsePkgConfig.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/UsePkgConfig.cmake')
-rw-r--r--Modules/UsePkgConfig.cmake52
1 files changed, 26 insertions, 26 deletions
diff --git a/Modules/UsePkgConfig.cmake b/Modules/UsePkgConfig.cmake
index 7f4318f..b1569f9 100644
--- a/Modules/UsePkgConfig.cmake
+++ b/Modules/UsePkgConfig.cmake
@@ -24,55 +24,55 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-FIND_PROGRAM(PKGCONFIG_EXECUTABLE NAMES pkg-config )
+find_program(PKGCONFIG_EXECUTABLE NAMES pkg-config )
-MACRO(PKGCONFIG _package _include_DIR _link_DIR _link_FLAGS _cflags)
- MESSAGE(STATUS
+macro(PKGCONFIG _package _include_DIR _link_DIR _link_FLAGS _cflags)
+ message(STATUS
"WARNING: you are using the obsolete 'PKGCONFIG' macro, use FindPkgConfig")
# reset the variables at the beginning
- SET(${_include_DIR})
- SET(${_link_DIR})
- SET(${_link_FLAGS})
- SET(${_cflags})
+ set(${_include_DIR})
+ set(${_link_DIR})
+ set(${_link_FLAGS})
+ set(${_cflags})
# if pkg-config has been found
- IF(PKGCONFIG_EXECUTABLE)
+ if(PKGCONFIG_EXECUTABLE)
- EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --exists RETURN_VALUE _return_VALUE OUTPUT_VARIABLE _pkgconfigDevNull )
+ exec_program(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --exists RETURN_VALUE _return_VALUE OUTPUT_VARIABLE _pkgconfigDevNull )
# and if the package of interest also exists for pkg-config, then get the information
- IF(NOT _return_VALUE)
+ if(NOT _return_VALUE)
- EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --variable=includedir
+ exec_program(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --variable=includedir
OUTPUT_VARIABLE ${_include_DIR} )
- STRING(REGEX REPLACE "[\r\n]" " " ${_include_DIR} "${${_include_DIR}}")
+ string(REGEX REPLACE "[\r\n]" " " ${_include_DIR} "${${_include_DIR}}")
- EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --variable=libdir
+ exec_program(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --variable=libdir
OUTPUT_VARIABLE ${_link_DIR} )
- STRING(REGEX REPLACE "[\r\n]" " " ${_link_DIR} "${${_link_DIR}}")
+ string(REGEX REPLACE "[\r\n]" " " ${_link_DIR} "${${_link_DIR}}")
- EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --libs
+ exec_program(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --libs
OUTPUT_VARIABLE ${_link_FLAGS} )
- STRING(REGEX REPLACE "[\r\n]" " " ${_link_FLAGS} "${${_link_FLAGS}}")
+ string(REGEX REPLACE "[\r\n]" " " ${_link_FLAGS} "${${_link_FLAGS}}")
- EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --cflags
+ exec_program(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --cflags
OUTPUT_VARIABLE ${_cflags} )
- STRING(REGEX REPLACE "[\r\n]" " " ${_cflags} "${${_cflags}}")
+ string(REGEX REPLACE "[\r\n]" " " ${_cflags} "${${_cflags}}")
- ELSE( NOT _return_VALUE)
+ else()
- MESSAGE(STATUS "PKGCONFIG() indicates that ${_package} is not installed (install the package which contains ${_package}.pc if you want to support this feature)")
+ message(STATUS "PKGCONFIG() indicates that ${_package} is not installed (install the package which contains ${_package}.pc if you want to support this feature)")
- ENDIF(NOT _return_VALUE)
+ endif()
# if pkg-config has NOT been found, INFORM the user
- ELSE(PKGCONFIG_EXECUTABLE)
+ else()
- MESSAGE(STATUS "WARNING: PKGCONFIG() indicates that the tool pkg-config has not been found on your system. You should install it.")
+ message(STATUS "WARNING: PKGCONFIG() indicates that the tool pkg-config has not been found on your system. You should install it.")
- ENDIF(PKGCONFIG_EXECUTABLE)
+ endif()
-ENDMACRO(PKGCONFIG _include_DIR _link_DIR _link_FLAGS _cflags)
+endmacro()
-MARK_AS_ADVANCED(PKGCONFIG_EXECUTABLE)
+mark_as_advanced(PKGCONFIG_EXECUTABLE)