diff options
| author | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
|---|---|---|
| committer | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
| commit | 54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch) | |
| tree | d915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/projectm | |
Diffstat (limited to 'vcpkg/ports/projectm')
| -rw-r--r-- | vcpkg/ports/projectm/macos-pkgconfig.patch | 13 | ||||
| -rw-r--r-- | vcpkg/ports/projectm/portfile.cmake | 57 | ||||
| -rw-r--r-- | vcpkg/ports/projectm/usage | 9 | ||||
| -rw-r--r-- | vcpkg/ports/projectm/vcpkg.json | 32 |
4 files changed, 111 insertions, 0 deletions
diff --git a/vcpkg/ports/projectm/macos-pkgconfig.patch b/vcpkg/ports/projectm/macos-pkgconfig.patch new file mode 100644 index 0000000..74f9279 --- /dev/null +++ b/vcpkg/ports/projectm/macos-pkgconfig.patch @@ -0,0 +1,13 @@ +--- a/src/libprojectM/CMakeLists.txt 2025-01-24 16:19:05.235818993 +0100 ++++ b/src/libprojectM/CMakeLists.txt 2025-01-24 16:18:52.445824000 +0100 +@@ -212,7 +212,9 @@ + + set(PKGCONFIG_PACKAGE_NAME "${PROJECTM_LIBRARY_BASE_OUTPUT_NAME}") + set(PKGCONFIG_PACKAGE_DESCRIPTION "projectM Music Visualizer") +- set(PKGCONFIG_PACKAGE_REQUIREMENTS_ALL "opengl") ++ if(NOT APPLE) ++ set(PKGCONFIG_PACKAGE_REQUIREMENTS_ALL "opengl") ++ endif() + + generate_pkg_config_files(projectM ${PROJECTM_LIBRARY_BASE_OUTPUT_NAME}) + diff --git a/vcpkg/ports/projectm/portfile.cmake b/vcpkg/ports/projectm/portfile.cmake new file mode 100644 index 0000000..2761c7b --- /dev/null +++ b/vcpkg/ports/projectm/portfile.cmake @@ -0,0 +1,57 @@ +vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO projectM-visualizer/projectm
+ REF "v${VERSION}"
+ SHA512 "c59885d1b6c96372f451b436a47a10e72f94e114b0dad913aa91b3ee5b48ce77f8423c011f60786cb2a2577d3875cba8e58f2e70e60116672cbc49b2de695ad4"
+ HEAD_REF master
+ PATCHES
+ macos-pkgconfig.patch
+)
+
+vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
+ FEATURES
+ "boost-filesystem" ENABLE_BOOST_FILESYSTEM
+)
+
+if (NOT ENABLE_BOOST_FILESYSTEM)
+ message(STATUS
+ "If your current vcpkg target triplet or toolchain does not support C++17 or lacks std::filesystem support, "
+ "please enable the \"boost-filesystem\" feature.")
+endif ()
+
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}"
+ OPTIONS
+ ${FEATURE_OPTIONS}
+
+ # Use projectm-eval and GLM from ports as well
+ -DENABLE_SYSTEM_PROJECTM_EVAL=ON
+ -DENABLE_SYSTEM_GLM=ON
+
+ # Enforce additional build flags
+ -DENABLE_PLAYLIST=ON
+ -DENABLE_SDL_UI=OFF
+ -DBUILD_TESTING=OFF
+ -DBUILD_DOCS=OFF
+)
+
+vcpkg_cmake_install()
+
+vcpkg_cmake_config_fixup(
+ PACKAGE_NAME "projectM4"
+ CONFIG_PATH "lib/cmake/projectM4"
+ DO_NOT_DELETE_PARENT_CONFIG_PATH
+)
+
+vcpkg_cmake_config_fixup(
+ PACKAGE_NAME "projectM4Playlist"
+ CONFIG_PATH "lib/cmake/projectM4Playlist"
+)
+
+vcpkg_fixup_pkgconfig()
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
+
+vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt")
+file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
diff --git a/vcpkg/ports/projectm/usage b/vcpkg/ports/projectm/usage new file mode 100644 index 0000000..6003873 --- /dev/null +++ b/vcpkg/ports/projectm/usage @@ -0,0 +1,9 @@ +projectm provides CMake targets:
+
+ find_package(projectM4 REQUIRED)
+ target_link_libraries(main PRIVATE libprojectM::projectM)
+
+To use and link the playlist library component:
+
+ find_package(projectM4 REQUIRED COMPONENTS Playlist)
+ target_link_libraries(main PRIVATE libprojectM::playlist)
diff --git a/vcpkg/ports/projectm/vcpkg.json b/vcpkg/ports/projectm/vcpkg.json new file mode 100644 index 0000000..d6a3b87 --- /dev/null +++ b/vcpkg/ports/projectm/vcpkg.json @@ -0,0 +1,32 @@ +{ + "name": "projectm", + "version": "4.1.4", + "description": "The projectM Music Visualizer. A cross-platform, OpenGL-based reimplementation of Milkdrop as a reusable library.", + "homepage": "https://github.com/projectM-visualizer/projectm", + "license": "LGPL-2.1-only AND MIT AND MIT-0", + "dependencies": [ + { + "name": "glew", + "platform": "windows" + }, + "glm", + "opengl", + "projectm-eval", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "features": { + "boost-filesystem": { + "description": "Use boost::filesystem instead of std::filesystem to target toolchains and platforms without C++17 support", + "dependencies": [ + "boost-filesystem" + ] + } + } +} |