[CMake] CMake 2.8.0 RC 4 ready for testing!

Gaëtan Lehmann gaetan.lehmann at jouy.inra.fr
Thu Oct 29 14:46:01 EDT 2009


Le 29 oct. 09 à 13:07, Mathieu Malaterre a écrit :

> Sorry but -again- I do not like your proposed fix. jni_md.h and jawt.h
> should be found within the same subdirectory as jni.h (by contract).
> So something like (not tested):
>
> <...>
> FIND_PATH(JAVA_INCLUDE_PATH jni.h
>  ${JAVA_AWT_INCLUDE_DIRECTORIES}
> )
>
> # ok we found jni.h, now derive other location from it:
> get_filename_component(jni_path ${JAVA_INCLUDE_PATH} PATH)
>
> FIND_PATH(JAVA_INCLUDE_PATH2 jni_md.h
>  ${jni_path}
>  ${jni_path}/win32
>  ${jni_path}/linux
>  ${jni_path}/freebsd
> )
>
> FIND_PATH(JAVA_AWT_INCLUDE_PATH jawt.h
>  ${jni_path}
> )
> <...>


Sorry, not fully related, but this list of OS-specific directories  
recalls me that the JAVA_INCLUDE_PATH2 was not found automatically on  
solaris and OpenSolaris.
Here are the paths where those files are located on Solaris 10u7.

/usr/j2se/include/solaris/jni_md.h
/usr/jdk/instances/jdk1.5.0/include/solaris/jni_md.h
/usr/j2se/include/jni.h
/usr/jdk/instances/jdk1.5.0/include/jni.h
/usr/j2se/include/jawt.h
/usr/jdk/instances/jdk1.5.0/include/jawt.h

The "solaris" subdir is also used on OpenSolaris.

Maybe JAVA_INCLUDE_PATH2 should get an extra directory where to search?

FIND_PATH(JAVA_INCLUDE_PATH2 jni_md.h
  ${jni_path}
  ${jni_path}/win32
  ${jni_path}/linux
  ${jni_path}/freebsd
  ${jni_path}/solaris
)

Regards,

Gaëtan


-- 
Gaëtan Lehmann
Biologie du Développement et de la Reproduction
INRA de Jouy-en-Josas (France)
tel: +33 1 34 65 29 66    fax: 01 34 65 29 09
http://voxel.jouy.inra.fr  http://www.itk.org
http://www.mandriva.org  http://www.bepo.fr

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 203 bytes
Desc: Ceci est une signature ?lectronique PGP
URL: <http://www.cmake.org/pipermail/cmake/attachments/20091029/63e0b27c/attachment.pgp>


More information about the CMake mailing list