blob: cddabe14e06450b5260d014cddb16f0f53829ea5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
|
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)
|