Commit e23aeb39 authored by Bill Hoffman's avatar Bill Hoffman
Browse files

ENH: merge in from main tree and fix bug for flex and yacc stuff in SecondLife

parent 7c473def
......@@ -354,7 +354,7 @@ ENDMACRO (CMAKE_BUILD_UTILITIES)
SET(CMake_VERSION_MAJOR 2)
SET(CMake_VERSION_MINOR 6)
SET(CMake_VERSION_PATCH 1)
SET(CMake_VERSION_RC 12)
SET(CMake_VERSION_RC 13)
# CVS versions are odd, if this is an odd minor version
# then set the CMake_VERSION_DATE variable
IF("${CMake_VERSION_MINOR}" MATCHES "[13579]$")
......
Changes in CMake 2.6.1 RC 12
- More find locations for FindJNI.
- Fix bug with source files ending in .l and .l.cpp, causing cmake
to think they were the same file in some cases.
- Fix issue with .lib being seen as .obj with VS due to a full path
to a library given without the file extension. This only worked
with the VS generator, but some projects had worked around it with
......
......@@ -3,35 +3,47 @@
# include files and libraries are. It also determines what the name of
# the library is. This code sets the following variables:
#
# JAVA_AWT_LIB_PATH = the path to the jawt library
# JAVA_JVM_LIB_PATH = the path to the jvm library
# JNI_INCLUDE_DIRS = the include dirs to use
# JNI_LIBRARIES = the libraries to use
# JAVA_AWT_LIBRARY = the path to the jawt library
# JAVA_JVM_LIBRARY = the path to the jvm library
# JAVA_INCLUDE_PATH = the include path to jni.h
# JAVA_INCLUDE_PATH2 = the include path to jni_md.h
# JAVA_AWT_INCLUDE_PATH = the include path to jawt.h
#
#
GET_FILENAME_COMPONENT(java_install_version
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit;CurrentVersion]" NAME)
SET(JAVA_AWT_LIBRARY_DIRECTORIES
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.4;JavaHome]/lib"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.3;JavaHome]/lib"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\${java_install_version};JavaHome]/lib"
$ENV{JAVA_HOME}/jre/lib/i386
$ENV{JAVA_HOME}/jre/lib/amd64
$ENV{JAVA_HOME}/jre/lib/ppc
/usr/lib
/usr/local/lib
/usr/lib/jvm/java/lib
/usr/lib/java/jre/lib/i386
/usr/local/lib/java/jre/lib/i386
/usr/local/share/java/jre/lib/i386
/usr/lib/j2sdk1.4-sun/jre/lib/i386
/usr/lib/j2sdk1.5-sun/jre/lib/i386
/opt/sun-jdk-1.5.0.04/jre/lib/amd64
/usr/lib/java/jre/lib/amd64
/usr/lib/jvm/java-6-sun-1.6.0.00/jre/lib/amd64
/usr/lib/java/jre/lib/amd64
/usr/local/lib/java/jre/lib/amd64
/usr/local/share/java/jre/lib/amd64
/usr/lib/j2sdk1.4-sun/jre/lib/amd64
/usr/lib/j2sdk1.5-sun/jre/lib/amd64
/usr/lib/java/jre/lib/ppc
/usr/local/lib/java/jre/lib/ppc
/usr/local/share/java/jre/lib/ppc
/usr/lib/j2sdk1.4-sun/jre/lib/ppc
/usr/lib/j2sdk1.5-sun/jre/lib/ppc
)
SET(JAVA_JVM_LIBRARY_DIRECTORIES)
FOREACH(dir ${JAVA_AWT_LIBRARY_DIRECTORIES})
SET(JAVA_JVM_LIBRARY_DIRECTORIES
......@@ -52,6 +64,7 @@ SET(JAVA_AWT_INCLUDE_DIRECTORIES
/usr/local/include
/usr/lib/java/include
/usr/local/lib/java/include
/usr/lib/jvm/java/include
/usr/lib/jvm/java-6-sun-1.6.0.00/include
/usr/local/share/java/include
/usr/lib/j2sdk1.4-sun/include
......@@ -130,6 +143,7 @@ FIND_PATH(JAVA_INCLUDE_PATH2 jni_md.h
${JAVA_AWT_INCLUDE_DIRECTORIES}
${JAVA_INCLUDE_PATH}/win32
${JAVA_INCLUDE_PATH}/linux
${JAVA_INCLUDE_PATH}/freebsd
)
FIND_PATH(JAVA_AWT_INCLUDE_PATH jawt.h
......@@ -144,3 +158,15 @@ MARK_AS_ADVANCED(
JAVA_INCLUDE_PATH
JAVA_INCLUDE_PATH2
)
SET(JNI_LIBRARIES
${JAVA_AWT_LIBRARY}
${JAVA_JVM_LIBRARY}
)
SET(JNI_INCLUDE_DIRS
${JAVA_INCLUDE_PATH}
${JAVA_INCLUDE_PATH2}
${JAVA_AWT_INCLUDE_PATH}
)
......@@ -100,6 +100,36 @@ void cmSourceFileLocation::UpdateExtension(const char* name)
this->Name = cmSystemTools::GetFilenameName(name);
this->AmbiguousExtension = false;
}
else
{
// This is not a known extension. See if the file exists on disk as
// named.
std::string tryPath;
if(this->AmbiguousDirectory)
{
// Check the source tree only because a file in the build tree should
// be specified by full path at least once. We do not want this
// detection to depend on whether the project has already been built.
tryPath = this->Makefile->GetCurrentDirectory();
tryPath += "/";
}
tryPath += this->Directory;
tryPath += "/";
tryPath += this->Name;
if(cmSystemTools::FileExists(tryPath.c_str(), true))
{
// We found a source file named by the user on disk. Trust it's
// extension.
this->Name = cmSystemTools::GetFilenameName(name);
this->AmbiguousExtension = false;
// If the directory was ambiguous, it isn't anymore.
if(this->AmbiguousDirectory)
{
this->DirectoryUseSource();
}
}
}
}
//----------------------------------------------------------------------------
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment