[iir1] Fix pkgconfig, control build (#42611)

This commit is contained in:
Kai Pastor 2024-12-10 17:05:45 +01:00 committed by GitHub
parent 96b5ced828
commit a0a9a771cf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 20 additions and 10 deletions

View File

@ -10,10 +10,13 @@ index 4dd67df..3840ff8 100644
install(TARGETS iir EXPORT iir-targets
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
@@ -91,6 +92,7 @@ install(TARGETS iir EXPORT iir-targets
@@ -91,6 +92,10 @@ install(TARGETS iir EXPORT iir-targets
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
PRIVATE_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/iir)
+ set(IIR1_INSTALL_STATIC OFF)
+else()
+ set_target_properties(iir PROPERTIES EXCLUDE_FROM_ALL 1)
+endif()
include(JoinPaths)

View File

@ -8,24 +8,25 @@ vcpkg_from_github(
fix-shared-lib.patch
)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" IIR1_INSTALL_STATIC)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DIIR1_INSTALL_STATIC=${IIR1_INSTALL_STATIC}
-DIIR1_BUILD_TESTING=OFF
-DIIR1_BUILD_DEMO=OFF
)
vcpkg_cmake_install()
vcpkg_copy_pdbs()
vcpkg_cmake_config_fixup(PACKAGE_NAME iir CONFIG_PATH lib/cmake/iir)
vcpkg_fixup_pkgconfig()
vcpkg_copy_pdbs()
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/iir.pc" " -liir" "-liir_static")
if(NOT VCPKG_BUILD_TYPE)
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/iir.pc" " -liir" " -liir_static")
endif()
endif()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")

View File

@ -1,7 +1,8 @@
{
"name": "iir1",
"version": "1.9.5",
"description": "Realtime C++ filter library",
"port-version": 1,
"description": "An infinite impulse response (IIR) filter library for realtime processing. It implements Butterworth, RBJ, Chebychev filters.",
"homepage": "https://github.com/berndporr/iir1",
"license": "MIT",
"supports": "!uwp",

View File

@ -3682,7 +3682,7 @@
},
"iir1": {
"baseline": "1.9.5",
"port-version": 0
"port-version": 1
},
"ijg-libjpeg": {
"baseline": "9e",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "bff2560998514e032c9e181d9a39358ed08f2cae",
"version": "1.9.5",
"port-version": 1
},
{
"git-tree": "6badd4b5988c56b5188d865a2f31d5d225e38d9f",
"version": "1.9.5",