-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update libxmp vcpkg port to latest git version for MIT relicense
- Loading branch information
Showing
4 changed files
with
91 additions
and
0 deletions.
There are no files selected for viewing
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,13 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index 1794cb2c1534d53d502785e0446d302e5439216a..c960405632c0d1b4797470424fce4ff8a7ec1aef 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -170,7 +170,7 @@ add_subdirectory(docs) | ||
|
||
include(CMakePackageConfigHelpers) | ||
|
||
-if(WIN32) | ||
+if(0) | ||
set(cmake_install_cmakdir "cmake") | ||
set(cmake_install_cmakdir_lite "cmake") | ||
else() |
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,43 @@ | ||
vcpkg_from_github( | ||
OUT_SOURCE_PATH SOURCE_PATH | ||
REPO libxmp/libxmp | ||
REF 25050f2657be54eae7c37325cefb9644588cf09e | ||
HEAD_REF master | ||
SHA512 4101dc302b5c1e926c703a74e2d1c1ee820221511dec681e161abf63c369ad2e617a5a21531c8c4343bee8adc9da376d5512b3e60b3e73475d5c5a5666da1fd5 | ||
PATCHES | ||
fix-cmake-config-dir.patch | ||
) | ||
|
||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC) | ||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED) | ||
|
||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS | ||
INVERTED_FEATURES | ||
depackers LIBXMP_DISABLE_DEPACKERS | ||
prowizard LIBXMP_DISABLE_PROWIZARD | ||
) | ||
|
||
vcpkg_cmake_configure( | ||
SOURCE_PATH "${SOURCE_PATH}" | ||
OPTIONS | ||
${FEATURE_OPTIONS} | ||
-DBUILD_STATIC=${BUILD_STATIC} | ||
-DBUILD_SHARED=${BUILD_SHARED} | ||
-DLIBXMP_DOCS=OFF | ||
) | ||
|
||
vcpkg_cmake_install() | ||
vcpkg_copy_pdbs() | ||
|
||
vcpkg_cmake_config_fixup( | ||
PACKAGE_NAME "libxmp" | ||
CONFIG_PATH "lib/cmake/libxmp" | ||
) | ||
|
||
vcpkg_fixup_pkgconfig() | ||
|
||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") | ||
|
||
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") | ||
|
||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/docs/COPYING") |
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,4 @@ | ||
libxmp provides CMake targets: | ||
|
||
find_package(libxmp CONFIG REQUIRED) | ||
target_link_libraries(main PRIVATE $<IF:$<TARGET_EXISTS:libxmp::xmp_shared>,libxmp::xmp_shared,libxmp::xmp_static>) |
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,31 @@ | ||
{ | ||
"name": "libxmp", | ||
"version": "4.6.0", | ||
"port-version": 1, | ||
"description": "Libxmp is a library that renders module files to PCM data.", | ||
"homepage": "https://sourceforge.net/projects/xmp/", | ||
"license": "MIT", | ||
"supports": "!xbox", | ||
"dependencies": [ | ||
{ | ||
"name": "vcpkg-cmake", | ||
"host": true | ||
}, | ||
{ | ||
"name": "vcpkg-cmake-config", | ||
"host": true | ||
} | ||
], | ||
"default-features": [ | ||
"depackers", | ||
"prowizard" | ||
], | ||
"features": { | ||
"depackers": { | ||
"description": "Enable archive depackers." | ||
}, | ||
"prowizard": { | ||
"description": "Enable ProWizard format loaders." | ||
} | ||
} | ||
} |