diff --git a/pm_java/CMakeLists.txt b/pm_java/CMakeLists.txt
index a350620..b491bbd 100644
--- a/pm_java/CMakeLists.txt
+++ b/pm_java/CMakeLists.txt
@@ -1,6 +1,7 @@
 # pm_java
 
 if(UNIX)
+else (UNIX)
   if(APPLE)
     # java not dealt with in CMake -- see pm_mac/pm_mac.xcodeproj
   else(APPLE)
diff --git a/pm_common/CMakeLists.txt b/pm_common/CMakeLists.txt
index e171047..68ac212 100644
--- a/pm_common/CMakeLists.txt
+++ b/pm_common/CMakeLists.txt
@@ -66,19 +66,19 @@ if(UNIX)
     set(JAVA_INCLUDE_PATHS ${JAVAVM_LIB}/Headers)
     message(STATUS "SYSROOT: " ${CMAKE_OSX_SYSROOT})
   else(APPLE)
-    # LINUX settings...
-    include(FindJNI)
-    message(STATUS "JAVA_JVM_LIB_PATH is " ${JAVA_JVM_LIB_PATH})
-    message(STATUS "JAVA_INCLUDE_PATH is " ${JAVA_INCLUDE_PATH})
-    message(STATUS "JAVA_INCLUDE_PATH2 is " ${JAVA_INCLUDE_PATH2})
-    message(STATUS "JAVA_JVM_LIBRARY is " ${JAVA_JVM_LIBRARY})
-    set(JAVA_INCLUDE_PATHS ${JAVA_INCLUDE_PATH} ${JAVA_INCLUDE_PATH2})
-    # libjvm.so is found relative to JAVA_INCLUDE_PATH:
-    set(JAVAVM_LIB ${JAVA_JVM_LIBRARY}/libjvm.so)
+#    # LINUX settings...
+#    include(FindJNI)
+#    message(STATUS "JAVA_JVM_LIB_PATH is " ${JAVA_JVM_LIB_PATH})
+#    message(STATUS "JAVA_INCLUDE_PATH is " ${JAVA_INCLUDE_PATH})
+#    message(STATUS "JAVA_INCLUDE_PATH2 is " ${JAVA_INCLUDE_PATH2})
+#    message(STATUS "JAVA_JVM_LIBRARY is " ${JAVA_JVM_LIBRARY})
+#    set(JAVA_INCLUDE_PATHS ${JAVA_INCLUDE_PATH} ${JAVA_INCLUDE_PATH2})
+#    # libjvm.so is found relative to JAVA_INCLUDE_PATH:
+#    set(JAVAVM_LIB ${JAVA_JVM_LIBRARY}/libjvm.so)

     set(LINUXSRC pmlinuxalsa pmlinux finddefault)
     prepend_path(LIBSRC ../pm_linux/ ${LINUXSRC})
-    list(APPEND LIBSRC ../porttime/ptlinux)
+    #list(APPEND LIBSRC ../porttime/ptlinux)

     set(PM_NEEDED_LIBS pthread asound)
   endif(APPLE)
@@ -104,24 +104,24 @@ set(JNI_EXTRA_LIBS ${PM_NEEDED_LIBS} ${JAVA_JVM_LIBRARY})
 # this completes the list of library sources by adding shared code
 list(APPEND LIBSRC pmutil portmidi)

-# now add the shared files to make the complete list of library sources
-add_library(portmidi-static ${LIBSRC})
-set_target_properties(portmidi-static PROPERTIES OUTPUT_NAME "portmidi_s")
+## now add the shared files to make the complete list of library sources
+add_library(portmidi-static STATIC ${LIBSRC})
+set_target_properties(portmidi-static PROPERTIES OUTPUT_NAME "portmidi")
 target_link_libraries(portmidi-static ${PM_NEEDED_LIBS})
-
-# define the jni library
-include_directories(${JAVA_INCLUDE_PATHS})
-
-set(JNISRC ${LIBSRC} ../pm_java/pmjni/pmjni.c)
-add_library(pmjni SHARED ${JNISRC})
-target_link_libraries(pmjni ${JNI_EXTRA_LIBS})
-set_target_properties(pmjni PROPERTIES EXECUTABLE_EXTENSION "jnilib")
-
+#
+## define the jni library
+#include_directories(${JAVA_INCLUDE_PATHS})
+#
+#set(JNISRC ${LIBSRC} ../pm_java/pmjni/pmjni.c)
+#add_library(pmjni SHARED ${JNISRC})
+#target_link_libraries(pmjni ${JNI_EXTRA_LIBS})
+#set_target_properties(pmjni PROPERTIES EXECUTABLE_EXTENSION "jnilib")
+#
 # install the libraries (Linux and Mac OS X command line)
 if(UNIX)
-  INSTALL(TARGETS portmidi-static pmjni
-    LIBRARY DESTINATION /usr/local/lib
-    ARCHIVE DESTINATION /usr/local/lib)
+  INSTALL(TARGETS portmidi-static
+    LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+    ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
 # .h files installed by pm_dylib/CMakeLists.txt, so don't need them here
 #  INSTALL(FILES portmidi.h ../porttime/porttime.h
 #    DESTINATION /usr/local/include)
