105 lines
4.4 KiB
Diff
105 lines
4.4 KiB
Diff
diff -rupN portmidi.orig/CMakeLists.txt portmidi/CMakeLists.txt
|
|
--- portmidi.orig/CMakeLists.txt 2010-09-20 15:57:48.000000000 +0100
|
|
+++ portmidi/CMakeLists.txt 2017-03-03 13:50:58.494561245 +0000
|
|
@@ -71,7 +71,3 @@ add_subdirectory(pm_common)
|
|
add_subdirectory(pm_test)
|
|
|
|
add_subdirectory(pm_dylib)
|
|
-
|
|
-# Cannot figure out how to make an xcode Java application with CMake
|
|
-add_subdirectory(pm_java)
|
|
-
|
|
diff -rupN portmidi.orig/pm_common/CMakeLists.txt portmidi/pm_common/CMakeLists.txt
|
|
--- portmidi.orig/pm_common/CMakeLists.txt 2010-09-20 15:57:48.000000000 +0100
|
|
+++ portmidi/pm_common/CMakeLists.txt 2017-03-03 14:02:32.851938051 +0000
|
|
@@ -67,14 +67,6 @@ if(UNIX)
|
|
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)
|
|
|
|
set(LINUXSRC pmlinuxalsa pmlinux finddefault)
|
|
prepend_path(LIBSRC ../pm_linux/ ${LINUXSRC})
|
|
@@ -99,7 +91,6 @@ else(UNIX)
|
|
set(PM_NEEDED_LIBS winmm.lib)
|
|
endif(WIN32)
|
|
endif(UNIX)
|
|
-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)
|
|
@@ -109,19 +100,11 @@ add_library(portmidi-static ${LIBSRC})
|
|
set_target_properties(portmidi-static PROPERTIES OUTPUT_NAME "portmidi_s")
|
|
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")
|
|
-
|
|
# 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 /app/lib
|
|
+ ARCHIVE DESTINATION /app/lib)
|
|
# .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)
|
|
diff -rupN portmidi.orig/pm_dylib/CMakeLists.txt portmidi/pm_dylib/CMakeLists.txt
|
|
--- portmidi.orig/pm_dylib/CMakeLists.txt 2009-11-20 00:41:10.000000000 +0000
|
|
+++ portmidi/pm_dylib/CMakeLists.txt 2017-03-03 14:03:56.807104521 +0000
|
|
@@ -63,7 +63,6 @@ if(UNIX)
|
|
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})
|
|
# note: should use JAVA_JVM_LIB_PATH, but it is not set properly
|
|
@@ -75,12 +74,7 @@ if(UNIX)
|
|
# JAVA_INCLUDE_PATH2; if no, then we need to make both JAVA_INCLUDE_PATH
|
|
# and JAVA_INCLUDE_PATH2 set by user (will need clear documentation
|
|
# because JAVA_INCLUDE_PATH2 is pretty obscure)
|
|
- set(JAVA_INCLUDE_PATH ${JAVA_INCLUDE_PATH-UNKNOWN}
|
|
- CACHE STRING "where to find Java SDK include directory")
|
|
- set(JAVA_INCLUDE_PATHS ${JAVA_INCLUDE_PATH} ${JAVA_INCLUDE_PATH}/linux)
|
|
- # libjvm.so is found relative to JAVA_INCLUDE_PATH:
|
|
- set(JAVAVM_LIB ${JAVA_INCLUDE_PATH}/../jre/lib/i386/client/libjvm.so)
|
|
-
|
|
+
|
|
set(LINUXSRC pmlinuxalsa pmlinux finddefault)
|
|
prepend_path(LIBSRC ../pm_linux/ ${LINUXSRC})
|
|
list(APPEND LIBSRC ../porttime/ptlinux)
|
|
@@ -106,7 +100,6 @@ else(UNIX)
|
|
# message(STATUS "JAVAVM_LIB: " ${JAVAVM_LIB})
|
|
endif(WIN32)
|
|
endif(UNIX)
|
|
-set(JNI_EXTRA_LIBS ${PM_NEEDED_LIBS} ${JAVAVM_LIB})
|
|
|
|
# this completes the list of library sources by adding shared code
|
|
set(SHARED_FILES pmutil portmidi)
|
|
@@ -120,8 +113,8 @@ target_link_libraries(portmidi-dynamic $
|
|
# install the libraries (Linux and Mac OS X command line)
|
|
if(UNIX)
|
|
INSTALL(TARGETS portmidi-dynamic
|
|
- LIBRARY DESTINATION /usr/local/lib
|
|
- ARCHIVE DESTINATION /usr/local/lib)
|
|
+ LIBRARY DESTINATION /app/lib
|
|
+ ARCHIVE DESTINATION /app/lib)
|
|
INSTALL(FILES ../pm_common/portmidi.h ../porttime/porttime.h
|
|
- DESTINATION /usr/local/include)
|
|
+ DESTINATION /app/include)
|
|
endif(UNIX)
|