Revision: 50317
          http://brlcad.svn.sourceforge.net/brlcad/?rev=50317&view=rev
Author:   starseeker
Date:     2012-04-26 12:50:31 +0000 (Thu, 26 Apr 2012)
Log Message:
-----------
Start straightening out Java and rtserver enablement now that we're not trying 
to link Java libs unnecessarily

Modified Paths:
--------------
    brlcad/trunk/CMakeLists.txt

Modified: brlcad/trunk/CMakeLists.txt
===================================================================
--- brlcad/trunk/CMakeLists.txt 2012-04-26 12:49:55 UTC (rev 50316)
+++ brlcad/trunk/CMakeLists.txt 2012-04-26 12:50:31 UTC (rev 50317)
@@ -897,7 +897,15 @@
 include(${BRLCAD_CMAKE_DIR}/Fink_MacPorts.cmake)
 
 # Option for librtserver, used to help Java programs interface with librt.
-option(BRLCAD_ENABLE_RTSERVER "Enable the librtserver target." OFF)
+# Find Java and JNI, and conditionalize the default setting on Java's
+# availability
+FIND_PACKAGE(Java)
+FIND_PACKAGE(JNI)
+if(JNI_FOUND AND JAVA_FOUND)
+  option(BRLCAD_ENABLE_RTSERVER "Enable the librtserver target." ON)
+else(JNI_FOUND AND JAVA_FOUND)
+  option(BRLCAD_ENABLE_RTSERVER "Enable the librtserver target." OFF)
+endif(JNI_FOUND AND JAVA_FOUND)
 
 # Turn off the brlcad.dll build.
 # It's an expert's setting at the moment.
@@ -1402,10 +1410,7 @@
 FIND_LIBRARY(CRYPT_LIBRARY NAMES crypt)
 mark_as_advanced(CRYPT_LIBRARY)
 
-# Find Java and JNI - conditionalize the include settings on
-# the success of the find_package calls.
-FIND_PACKAGE(Java)
-FIND_PACKAGE(JNI)
+# Do some extra Java related checks.
 if(JNI_FOUND AND JAVA_FOUND)
   BRLCAD_INCLUDE_FILE(JavaVM/jni.h HAVE_JAVAVM_JNI_H)
   BRLCAD_INCLUDE_FILE(jni.h HAVE_JNI_H "${JNI_INCLUDE_DIRS}")

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to