Skip to content

Instantly share code, notes, and snippets.

@rryan
Last active August 29, 2015 14:01
Show Gist options
  • Save rryan/3b92d65242d358d1fb94 to your computer and use it in GitHub Desktop.
Save rryan/3b92d65242d358d1fb94 to your computer and use it in GitHub Desktop.
mixxx-portmidi
diff -b -u -r portmidi/CMakeLists.txt portmidi-fixes/CMakeLists.txt
--- portmidi/CMakeLists.txt 2010-09-20 15:57:48.000000000 -0400
+++ portmidi-fixes/CMakeLists.txt 2014-05-12 20:09:08.000000000 -0400
@@ -36,8 +36,6 @@
set(CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO "" CACHE INTERNAL "Unused")
set(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "" CACHE INTERNAL "Unused")
-set(CMAKE_OSX_ARCHITECTURES i386 ppc x86_64 CACHE STRING "change to needed architecture for a smaller library" FORCE)
-
PROJECT(portmidi)
if(UNIX)
@@ -65,6 +63,12 @@
endif(CMAKE_LIBRARY_OUTPUT_DIRECTORY MATCHES ${BAD_DIR})
endif(UNIX)
+set(LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)")
+set(EXEC_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX} CACHE PATH "Installation prefix for executables and object code libraries" FORCE)
+set(BIN_INSTALL_DIR ${EXEC_INSTALL_PREFIX}/bin CACHE PATH "Installation prefix for user executables" FORCE)
+set(LIB_INSTALL_DIR ${EXEC_INSTALL_PREFIX}/lib${LIB_SUFFIX} CACHE PATH "Installation prefix for object code libraries" FORCE)
+set(INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/include CACHE PATH "Installation prefix for C header files" FORCE)
+
include_directories(pm_common porttime)
add_subdirectory(pm_common)
diff -b -u -r portmidi/pm_common/CMakeLists.txt portmidi-fixes/pm_common/CMakeLists.txt
--- portmidi/pm_common/CMakeLists.txt 2010-09-20 15:57:48.000000000 -0400
+++ portmidi-fixes/pm_common/CMakeLists.txt 2014-05-12 20:02:25.000000000 -0400
@@ -22,10 +22,7 @@
endif(APPLE OR WIN32)
if(APPLE)
- set(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX10.5.sdk CACHE
- PATH "-isysroot parameter for compiler" FORCE)
- set(CMAKE_C_FLAGS "-mmacosx-version-min=10.5" CACHE
- STRING "needed in conjunction with CMAKE_OSX_SYSROOT" FORCE)
+
endif(APPLE)
macro(prepend_path RESULT PATH)
@@ -120,8 +117,8 @@
# 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)
+ LIBRARY DESTINATION ${LIB_INSTALL_DIR}
+ ARCHIVE DESTINATION ${LIB_INSTALL_DIR})
# .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 -b -u -r portmidi/pm_dylib/CMakeLists.txt portmidi-fixes/pm_dylib/CMakeLists.txt
--- portmidi/pm_dylib/CMakeLists.txt 2009-11-20 00:41:09.000000000 -0500
+++ portmidi-fixes/pm_dylib/CMakeLists.txt 2014-05-12 20:03:17.000000000 -0400
@@ -120,8 +120,8 @@
# 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 ${LIB_INSTALL_DIR}
+ ARCHIVE DESTINATION ${LIB_INSTALL_DIR})
INSTALL(FILES ../pm_common/portmidi.h ../porttime/porttime.h
- DESTINATION /usr/local/include)
+ DESTINATION ${INCLUDE_INSTALL_DIR})
endif(UNIX)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment