diff options
author | Kitware Robot <kwrobot@kitware.com> | 2012-08-13 17:47:32 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2012-08-13 18:19:16 (GMT) |
commit | 77543bde41b0e52c3959016698b529835945d62d (patch) | |
tree | ff63e5fbec326c4a5d821e7496c6d2cb52f75b92 /Modules/UsePkgConfig.cmake | |
parent | 7bbaa4283de26864b2e55e819db0884771585467 (diff) | |
download | CMake-77543bde41b0e52c3959016698b529835945d62d.zip CMake-77543bde41b0e52c3959016698b529835945d62d.tar.gz CMake-77543bde41b0e52c3959016698b529835945d62d.tar.bz2 |
Convert CMake-language commands to lower case
Ancient CMake versions required upper-case commands. Later command
names became case-insensitive. Now the preferred style is lower-case.
Run the following shell code:
cmake --help-command-list |
grep -v "cmake version" |
while read c; do
echo 's/\b'"$(echo $c | tr '[:lower:]' '[:upper:]')"'\(\s*\)(/'"$c"'\1(/g'
done >convert.sed &&
git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' |
egrep -z -v '^(Utilities/cm|Source/kwsys/)' |
xargs -0 sed -i -f convert.sed &&
rm convert.sed
Diffstat (limited to 'Modules/UsePkgConfig.cmake')
-rw-r--r-- | Modules/UsePkgConfig.cmake | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/Modules/UsePkgConfig.cmake b/Modules/UsePkgConfig.cmake index 7f4318f..b4517f7 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( NOT _return_VALUE) - 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(NOT _return_VALUE) # if pkg-config has NOT been found, INFORM the user - ELSE(PKGCONFIG_EXECUTABLE) + else(PKGCONFIG_EXECUTABLE) - 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(PKGCONFIG_EXECUTABLE) -ENDMACRO(PKGCONFIG _include_DIR _link_DIR _link_FLAGS _cflags) +endmacro(PKGCONFIG _include_DIR _link_DIR _link_FLAGS _cflags) -MARK_AS_ADVANCED(PKGCONFIG_EXECUTABLE) +mark_as_advanced(PKGCONFIG_EXECUTABLE) |