vcpkg/ports/wildmidi/portfile.cmake
Victor Romero 050e71d01d
Remove references to CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS (#5937)
* [various ports] remove references to CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS

* [alac,benchmark,capnproto] Fix  check_linkage call

* [fastlz] Fix SHA512

* [coroutine] Fix dynamic build

* [folly] Find double-conversion

* [gamma] Use vcpkg_from_github

* [librsync] Enable static builds

* [netcdf-cxx4] Fix SHA512

* [octomap] Fix static build

* [tidy-html5] Fix static build

* [various ports] remove custom messages for shared/static builds, modernize some scripts in the meantime

* [folly] Use ras0219's fix for link paths

* [octomap] Fix exported targets

* [uvatlas] Set tool download SHA512

* [duktape+python2] fix portfile to call configure with correct python version, manage python2 also outside win32

* [suitesparse] osx fix

* [gtkmm] Call vcpkg_check_linkage after including vcpkg functions

* [duktape] Resolve conflicts

* [duktape] FIxed typo in Python paths

* [wangle] Find zlib

* [openssl-uwp] Fix SHA512

* [glib] Allow static builds on non-Windows

* [suitesparse] Fix build on Windows

* [multiple ports] Bump CONTROL version

* [multiple ports] Fix description indent

* [directxtk] Fix CONTROL file

* [bde,duktape,qpid-proton] Build packages with python2 installed

* [binn] remove CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS

* [gdal,live555,uriparser] Fix regressions

* [live555] Update to 2019.04.24
2019-05-02 22:57:43 -07:00

50 lines
1.8 KiB
CMake

include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO Mindwerks/wildmidi
REF wildmidi-0.4.1
SHA512 ac95b901d2eca88118d70ec5f8ddb4a52ed9ffbd90ae1c8837352d22e27da0d5f56e4e79615cbac9683303b3488a9fa45b60d77e28f698277f1e4c3fc9e3d165
HEAD_REF master
PATCHES
0001-add-install-target.patch
0002-use-ansi.patch
)
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
set(WANT_STATIC "OFF")
else()
set(WANT_STATIC "ON")
endif()
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DWANT_PLAYER=OFF
-DWANT_STATIC=${WANT_STATIC}
)
vcpkg_install_cmake()
vcpkg_copy_pdbs()
# Rename library to get rid of _dynamic and _static suffix
if(NOT VCPKG_CMAKE_SYSTEM_NAME)
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/wildmidi_dynamic.lib ${CURRENT_PACKAGES_DIR}/lib/wildmidi.lib)
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/wildmidi_dynamic.lib ${CURRENT_PACKAGES_DIR}/debug/lib/wildmidi.lib)
file(RENAME ${CURRENT_PACKAGES_DIR}/bin/wildmidi_dynamic.dll ${CURRENT_PACKAGES_DIR}/bin/wildmidi.dll)
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/bin/wildmidi_dynamic.dll ${CURRENT_PACKAGES_DIR}/debug/bin/wildmidi.dll)
else()
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/wildmidi_static.lib ${CURRENT_PACKAGES_DIR}/lib/wildmidi.lib)
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/wildmidi_static.lib ${CURRENT_PACKAGES_DIR}/debug/lib/wildmidi.lib)
endif()
endif()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share)
# Handle copyright
file(INSTALL ${SOURCE_PATH}/docs/license/LGPLv3.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/wildmidi RENAME copyright)