aboutsummaryrefslogtreecommitdiffstats
path: root/testing/portmidi/00_cmake.patch
blob: af8062c0ef9fff2821f63045241a3e8c6b996958 (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
--- a/pm_dylib/CMakeLists.txt
+++ b/pm_dylib/CMakeLists.txt
@@ -115,13 +115,14 @@
 
 add_library(portmidi-dynamic SHARED ${LIBSRC})
 set_target_properties(portmidi-dynamic PROPERTIES OUTPUT_NAME "portmidi")
+set_target_properties(portmidi-dynamic PROPERTIES VERSION "0.0.0" SOVERSION "0")
 target_link_libraries(portmidi-dynamic ${PM_NEEDED_LIBS})
 
 # 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 ${CMAKE_INSTALL_LIBDIR}
+    ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
   INSTALL(FILES ../pm_common/portmidi.h ../porttime/porttime.h
-    DESTINATION /usr/local/include)
+    DESTINATION include)
 endif(UNIX)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4919b78..4067a5a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -4,6 +4,8 @@
 
 cmake_minimum_required(VERSION 2.6)
 
+include(GNUInstallDirs)
+
 if(UNIX)
   # allow user to set Release or Debug
   set(CMAKE_BUILD_TYPE Release CACHE STRING