forked from microsoft/vcpkg
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[portmidi] Switch to the Mxxx fork at https://github.com/mixxxdj/port…
- Loading branch information
Showing
3 changed files
with
32 additions
and
46 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,19 @@ | ||
vcpkg_fail_port_install(ON_TARGET "linux" "osx" "uwp" ON_ARCH "arm") | ||
vcpkg_fail_port_install(ON_TARGET "UWP") | ||
|
||
vcpkg_from_sourceforge( | ||
vcpkg_from_github( | ||
OUT_SOURCE_PATH SOURCE_PATH | ||
REPO portmedia | ||
FILENAME "portmedia-code-r234.zip" | ||
SHA512 cbc332d89bc465450b38245a83cc300dfd2e1e6de7c62284edf754ff4d8a9aa3dc49a395dcee535ed9688befb019186fa87fd6d8a3698898c2acbf3e6b7a0794 | ||
REPO mixxxdj/portmidi | ||
REF 236 | ||
SHA512 901729440c4b8c654ab17c4c4f1e3986813bf1e4ad1a874f46e7b1ee0c9ef4ee9f1ecfdf71012fb56b055a6185194dd22c520ae87b9f2259c18af5d189ca57da | ||
HEAD_REF main | ||
) | ||
|
||
# Alter path to main portmidi root | ||
set(SOURCE_PATH "${SOURCE_PATH}/portmidi/trunk") | ||
vcpkg_cmake_configure(SOURCE_PATH "${SOURCE_PATH}") | ||
vcpkg_cmake_install() | ||
|
||
# Mark portmidi-static as static, disable pmjni library depending on the Java SDK | ||
vcpkg_copy_pdbs() | ||
vcpkg_fixup_pkgconfig() | ||
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/PortMidi) | ||
|
||
file(READ "${SOURCE_PATH}/pm_common/CMakeLists.txt" PM_CMAKE) | ||
string(REPLACE "add_library(portmidi-static \${LIBSRC})" "add_library(portmidi-static STATIC \${LIBSRC})" PM_CMAKE "${PM_CMAKE}") | ||
string(REPLACE "add_library(pmjni SHARED \${JNISRC})" "# Removed pmjni" PM_CMAKE "${PM_CMAKE}") | ||
string(REPLACE "target_link_libraries(pmjni \${JNI_EXTRA_LIBS})" "# Removed pmjni" PM_CMAKE "${PM_CMAKE}") | ||
string(REPLACE "set_target_properties(pmjni PROPERTIES EXECUTABLE_EXTENSION \"jnilib\")" "# Removed pmjni" PM_CMAKE "${PM_CMAKE}") | ||
file(WRITE "${SOURCE_PATH}/pm_common/CMakeLists.txt" "${PM_CMAKE}") | ||
|
||
# Run cmake configure step | ||
vcpkg_configure_cmake( | ||
SOURCE_PATH ${SOURCE_PATH} | ||
OPTIONS | ||
-DJAVA_INCLUDE_PATH= | ||
-DJAVA_INCLUDE_PATH2= | ||
-DJAVA_JVM_LIBRARY= | ||
) | ||
|
||
# Run cmake build step, nothing is installed on Windows | ||
vcpkg_build_cmake() | ||
|
||
file(INSTALL ${SOURCE_PATH}/pm_common/portmidi.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) | ||
file(INSTALL ${SOURCE_PATH}/porttime/porttime.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) | ||
|
||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") | ||
file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Release/portmidi_s.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) | ||
file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/portmidi_s.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) | ||
else() | ||
file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Release/portmidi.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin) | ||
file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Release/portmidi.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) | ||
file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/portmidi.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) | ||
file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/portmidi.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) | ||
endif() | ||
|
||
file(INSTALL ${SOURCE_PATH}/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/portmidi RENAME copyright) | ||
file(INSTALL "${SOURCE_PATH}/license.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) | ||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"name": "portmidi", | ||
"version": "0.236", | ||
"description": "PortMidi is a cross platform (Windows, macOS, Linux, and BSDs which support alsalib) library for interfacing with operating systems' MIDI I/O APIs.", | ||
"homepage": "https://github.com/mixxxdj/portmidi", | ||
"license": "MIT", | ||
"supports": "!uwp", | ||
"dependencies": [ | ||
{ | ||
"name": "vcpkg-cmake", | ||
"host": true | ||
}, | ||
{ | ||
"name": "vcpkg-cmake-config", | ||
"host": true | ||
} | ||
] | ||
} | ||
|