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/FindJasper.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/FindJasper.cmake')
-rw-r--r-- | Modules/FindJasper.cmake | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/Modules/FindJasper.cmake b/Modules/FindJasper.cmake index b617844..c5b865a 100644 --- a/Modules/FindJasper.cmake +++ b/Modules/FindJasper.cmake @@ -21,33 +21,33 @@ # (To distribute this file outside of CMake, substitute the full # License text for the above reference.) -FIND_PATH(JASPER_INCLUDE_DIR jasper/jasper.h) +find_path(JASPER_INCLUDE_DIR jasper/jasper.h) -IF (NOT JASPER_LIBRARIES) - FIND_PACKAGE(JPEG) +if (NOT JASPER_LIBRARIES) + find_package(JPEG) - FIND_LIBRARY(JASPER_LIBRARY_RELEASE NAMES jasper libjasper) - FIND_LIBRARY(JASPER_LIBRARY_DEBUG NAMES jasperd) + find_library(JASPER_LIBRARY_RELEASE NAMES jasper libjasper) + find_library(JASPER_LIBRARY_DEBUG NAMES jasperd) - INCLUDE(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake) SELECT_LIBRARY_CONFIGURATIONS(JASPER) -ENDIF (NOT JASPER_LIBRARIES) +endif (NOT JASPER_LIBRARIES) -IF (JASPER_INCLUDE_DIR AND EXISTS "${JASPER_INCLUDE_DIR}/jasper/jas_config.h") - FILE(STRINGS "${JASPER_INCLUDE_DIR}/jasper/jas_config.h" jasper_version_str REGEX "^#define[\t ]+JAS_VERSION[\t ]+\".*\".*") +if (JASPER_INCLUDE_DIR AND EXISTS "${JASPER_INCLUDE_DIR}/jasper/jas_config.h") + file(STRINGS "${JASPER_INCLUDE_DIR}/jasper/jas_config.h" jasper_version_str REGEX "^#define[\t ]+JAS_VERSION[\t ]+\".*\".*") - STRING(REGEX REPLACE "^#define[\t ]+JAS_VERSION[\t ]+\"([^\"]+)\".*" "\\1" JASPER_VERSION_STRING "${jasper_version_str}") -ENDIF (JASPER_INCLUDE_DIR AND EXISTS "${JASPER_INCLUDE_DIR}/jasper/jas_config.h") + string(REGEX REPLACE "^#define[\t ]+JAS_VERSION[\t ]+\"([^\"]+)\".*" "\\1" JASPER_VERSION_STRING "${jasper_version_str}") +endif (JASPER_INCLUDE_DIR AND EXISTS "${JASPER_INCLUDE_DIR}/jasper/jas_config.h") # handle the QUIETLY and REQUIRED arguments and set JASPER_FOUND to TRUE if # all listed variables are TRUE -INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) +include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) FIND_PACKAGE_HANDLE_STANDARD_ARGS(Jasper REQUIRED_VARS JASPER_LIBRARIES JASPER_INCLUDE_DIR JPEG_LIBRARIES VERSION_VAR JASPER_VERSION_STRING) -IF (JASPER_FOUND) - SET(JASPER_LIBRARIES ${JASPER_LIBRARIES} ${JPEG_LIBRARIES} ) -ENDIF (JASPER_FOUND) +if (JASPER_FOUND) + set(JASPER_LIBRARIES ${JASPER_LIBRARIES} ${JPEG_LIBRARIES} ) +endif (JASPER_FOUND) -MARK_AS_ADVANCED(JASPER_INCLUDE_DIR) +mark_as_advanced(JASPER_INCLUDE_DIR) |