summaryrefslogtreecommitdiffstats
path: root/Modules/FindJNI.cmake
diff options
context:
space:
mode:
authorKitware Robot <kwrobot@kitware.com>2012-08-13 17:50:14 (GMT)
committerBrad King <brad.king@kitware.com>2012-08-13 18:19:16 (GMT)
commit9db3116226cb99fcf54e936c833953abcde9b729 (patch)
treebd755ed9e616bbf1482a894bc7946980d81b7703 /Modules/FindJNI.cmake
parent77543bde41b0e52c3959016698b529835945d62d (diff)
downloadCMake-9db3116226cb99fcf54e936c833953abcde9b729.zip
CMake-9db3116226cb99fcf54e936c833953abcde9b729.tar.gz
CMake-9db3116226cb99fcf54e936c833953abcde9b729.tar.bz2
Remove CMake-language block-end command arguments
Ancient versions of CMake required else(), endif(), and similar block termination commands to have arguments matching the command starting the block. This is no longer the preferred style. Run the following shell code: for c in else endif endforeach endfunction endmacro endwhile; do echo 's/\b'"$c"'\(\s*\)(.\+)/'"$c"'\1()/' done >convert.sed && git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' | egrep -z -v '^(Utilities/cm|Source/kwsys/)' | egrep -z -v 'Tests/CMakeTests/While-Endwhile-' | xargs -0 sed -i -f convert.sed && rm convert.sed
Diffstat (limited to 'Modules/FindJNI.cmake')
-rw-r--r--Modules/FindJNI.cmake48
1 files changed, 24 insertions, 24 deletions
diff --git a/Modules/FindJNI.cmake b/Modules/FindJNI.cmake
index 1dae07e..0de3f79 100644
--- a/Modules/FindJNI.cmake
+++ b/Modules/FindJNI.cmake
@@ -59,15 +59,15 @@ macro(java_append_library_directories _var)
set(_java_libarch "${CMAKE_SYSTEM_PROCESSOR}" "s390" "s390x")
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^sh")
set(_java_libarch "sh")
- else(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
+ else()
set(_java_libarch "${CMAKE_SYSTEM_PROCESSOR}")
- endif(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
+ endif()
# Append default list architectures if CMAKE_SYSTEM_PROCESSOR was empty or
# system is non-Linux (where the code above has not been well tested)
if(NOT _java_libarch OR NOT (CMAKE_SYSTEM_NAME MATCHES "Linux"))
list(APPEND _java_libarch "i386" "amd64" "ppc")
- endif(NOT _java_libarch OR NOT (CMAKE_SYSTEM_NAME MATCHES "Linux"))
+ endif()
# Sometimes ${CMAKE_SYSTEM_PROCESSOR} is added to the list to prefer
# current value to a hardcoded list. Remove possible duplicates.
@@ -78,12 +78,12 @@ macro(java_append_library_directories _var)
foreach(_libarch ${_java_libarch})
string(REPLACE "{libarch}" "${_libarch}" _newpath "${_path}")
list(APPEND ${_var} "${_newpath}")
- endforeach(_libarch)
- else(_path MATCHES "{libarch}")
+ endforeach()
+ else()
list(APPEND ${_var} "${_path}")
- endif(_path MATCHES "{libarch}")
- endforeach(_path)
-endmacro(java_append_library_directories)
+ endif()
+ endforeach()
+endmacro()
get_filename_component(java_install_version
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit;CurrentVersion]" NAME)
@@ -130,7 +130,7 @@ foreach(dir ${JAVA_AWT_LIBRARY_DIRECTORIES})
"${dir}/client"
"${dir}/server"
)
-endforeach(dir)
+endforeach()
set(JAVA_AWT_INCLUDE_DIRECTORIES
@@ -160,43 +160,43 @@ foreach(JAVA_PROG "${JAVA_RUNTIME}" "${JAVA_COMPILE}" "${JAVA_ARCHIVE}")
foreach(JAVA_INC_PATH ../include ../java/include ../share/java/include)
if(EXISTS ${jpath}/${JAVA_INC_PATH})
set(JAVA_AWT_INCLUDE_DIRECTORIES ${JAVA_AWT_INCLUDE_DIRECTORIES} "${jpath}/${JAVA_INC_PATH}")
- endif(EXISTS ${jpath}/${JAVA_INC_PATH})
- endforeach(JAVA_INC_PATH)
+ endif()
+ endforeach()
foreach(JAVA_LIB_PATH
../lib ../jre/lib ../jre/lib/i386
../java/lib ../java/jre/lib ../java/jre/lib/i386
../share/java/lib ../share/java/jre/lib ../share/java/jre/lib/i386)
if(EXISTS ${jpath}/${JAVA_LIB_PATH})
set(JAVA_AWT_LIBRARY_DIRECTORIES ${JAVA_AWT_LIBRARY_DIRECTORIES} "${jpath}/${JAVA_LIB_PATH}")
- endif(EXISTS ${jpath}/${JAVA_LIB_PATH})
- endforeach(JAVA_LIB_PATH)
-endforeach(JAVA_PROG)
+ endif()
+ endforeach()
+endforeach()
if(APPLE)
if(EXISTS ~/Library/Frameworks/JavaVM.framework)
set(JAVA_HAVE_FRAMEWORK 1)
- endif(EXISTS ~/Library/Frameworks/JavaVM.framework)
+ endif()
if(EXISTS /Library/Frameworks/JavaVM.framework)
set(JAVA_HAVE_FRAMEWORK 1)
- endif(EXISTS /Library/Frameworks/JavaVM.framework)
+ endif()
if(EXISTS /System/Library/Frameworks/JavaVM.framework)
set(JAVA_HAVE_FRAMEWORK 1)
- endif(EXISTS /System/Library/Frameworks/JavaVM.framework)
+ endif()
if(JAVA_HAVE_FRAMEWORK)
if(NOT JAVA_AWT_LIBRARY)
set (JAVA_AWT_LIBRARY "-framework JavaVM" CACHE FILEPATH "Java Frameworks" FORCE)
- endif(NOT JAVA_AWT_LIBRARY)
+ endif()
if(NOT JAVA_JVM_LIBRARY)
set (JAVA_JVM_LIBRARY "-framework JavaVM" CACHE FILEPATH "Java Frameworks" FORCE)
- endif(NOT JAVA_JVM_LIBRARY)
+ endif()
if(NOT JAVA_AWT_INCLUDE_PATH)
if(EXISTS /System/Library/Frameworks/JavaVM.framework/Headers/jawt.h)
set (JAVA_AWT_INCLUDE_PATH "/System/Library/Frameworks/JavaVM.framework/Headers" CACHE FILEPATH "jawt.h location" FORCE)
- endif(EXISTS /System/Library/Frameworks/JavaVM.framework/Headers/jawt.h)
- endif(NOT JAVA_AWT_INCLUDE_PATH)
+ endif()
+ endif()
# If using "-framework JavaVM", prefer its headers *before* the others in
# JAVA_AWT_INCLUDE_DIRECTORIES... (*prepend* to the list here)
@@ -207,15 +207,15 @@ if(APPLE)
/System/Library/Frameworks/JavaVM.framework/Headers
${JAVA_AWT_INCLUDE_DIRECTORIES}
)
- endif(JAVA_HAVE_FRAMEWORK)
-else(APPLE)
+ endif()
+else()
find_library(JAVA_AWT_LIBRARY jawt
PATHS ${JAVA_AWT_LIBRARY_DIRECTORIES}
)
find_library(JAVA_JVM_LIBRARY NAMES jvm JavaVM
PATHS ${JAVA_JVM_LIBRARY_DIRECTORIES}
)
-endif(APPLE)
+endif()
# add in the include path
find_path(JAVA_INCLUDE_PATH jni.h