aboutsummaryrefslogtreecommitdiffstats
path: root/community/portmidi/30-porttime_cmake.patch
blob: f03e33fcaeb84764f1acffb5289a25033501d165 (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
diff --git a/porttime/CMakeLists.txt b/porttime/CMakeLists.txt
new file mode 100644
index 0000000..7c4da89
--- /dev/null
+++ b/porttime/CMakeLists.txt
@@ -0,0 +1,13 @@
+if(UNIX)
+  list(APPEND LIBSRC ptlinux)
+  set(PM_NEEDED_LIBS pthread asound)
+  add_library(porttime SHARED ${LIBSRC})
+  set_target_properties(porttime PROPERTIES VERSION "0.0.0" SOVERSION "0")
+  target_link_libraries(porttime ${PM_NEEDED_LIBS})
+  add_library(porttime-static ${LIBSRC})
+  set_target_properties(porttime-static PROPERTIES OUTPUT_NAME "porttime")
+  target_link_libraries(porttime-static ${PM_NEEDED_LIBS})
+  INSTALL(TARGETS porttime porttime-static
+    LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
+    ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}")
+endif(UNIX)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4919b78..08301a0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -74,6 +74,8 @@
 
 add_subdirectory(pm_dylib)
 
+add_subdirectory(porttime)
+
 # Cannot figure out how to make an xcode Java application with CMake
 add_subdirectory(pm_java)