mirror of
https://github.com/cemu-project/vcpkg.git
synced 2025-02-23 02:57:09 +01:00
opusfile: Add feature for disabling the openssl dependency (#3527)
* opusfile: Add feature for disabling the openssl dependency * [opusfile] Rename feature openssl -> opusurl to better describe this library's interface
This commit is contained in:
parent
72d7c3d3a9
commit
ad2bcd9dad
@ -10,8 +10,6 @@ find_library(OGG_LIBRARY ogg)
|
|||||||
find_path(OPUS_INCLUDE_DIR opus.h PATH_SUFFIXES opus)
|
find_path(OPUS_INCLUDE_DIR opus.h PATH_SUFFIXES opus)
|
||||||
find_library(OPUS_LIBRARY opus)
|
find_library(OPUS_LIBRARY opus)
|
||||||
|
|
||||||
find_package(OpenSSL MODULE REQUIRED)
|
|
||||||
|
|
||||||
add_library(opusfile
|
add_library(opusfile
|
||||||
src/info.c
|
src/info.c
|
||||||
src/internal.c
|
src/internal.c
|
||||||
@ -21,19 +19,28 @@ add_library(opusfile
|
|||||||
target_include_directories(opusfile PRIVATE include PUBLIC ${OGG_INCLUDE_DIR} ${OPUS_INCLUDE_DIR})
|
target_include_directories(opusfile PRIVATE include PUBLIC ${OGG_INCLUDE_DIR} ${OPUS_INCLUDE_DIR})
|
||||||
target_link_libraries(opusfile PRIVATE ${OGG_LIBRARY} ${OPUS_LIBRARY})
|
target_link_libraries(opusfile PRIVATE ${OGG_LIBRARY} ${OPUS_LIBRARY})
|
||||||
|
|
||||||
add_library(opusurl
|
install(TARGETS opusfile
|
||||||
src/http.c
|
|
||||||
src/wincerts.c)
|
|
||||||
|
|
||||||
target_compile_definitions(opusurl PRIVATE OP_ENABLE_HTTP)
|
|
||||||
target_include_directories(opusurl PRIVATE include)
|
|
||||||
target_link_libraries(opusurl PRIVATE opusfile OpenSSL::SSL ws2_32.lib crypt32.lib)
|
|
||||||
|
|
||||||
install(TARGETS opusfile opusurl
|
|
||||||
RUNTIME DESTINATION bin
|
RUNTIME DESTINATION bin
|
||||||
LIBRARY DESTINATION lib
|
LIBRARY DESTINATION lib
|
||||||
ARCHIVE DESTINATION lib)
|
ARCHIVE DESTINATION lib)
|
||||||
|
|
||||||
|
if(BUILD_OPUSURL)
|
||||||
|
find_package(OpenSSL MODULE REQUIRED)
|
||||||
|
|
||||||
|
add_library(opusurl
|
||||||
|
src/http.c
|
||||||
|
src/wincerts.c)
|
||||||
|
|
||||||
|
target_compile_definitions(opusurl PRIVATE OP_ENABLE_HTTP)
|
||||||
|
target_include_directories(opusurl PRIVATE include)
|
||||||
|
target_link_libraries(opusurl PRIVATE opusfile OpenSSL::SSL ws2_32.lib crypt32.lib)
|
||||||
|
|
||||||
|
install(TARGETS opusurl
|
||||||
|
RUNTIME DESTINATION bin
|
||||||
|
LIBRARY DESTINATION lib
|
||||||
|
ARCHIVE DESTINATION lib)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(NOT OPUSFILE_SKIP_HEADERS)
|
if(NOT OPUSFILE_SKIP_HEADERS)
|
||||||
install(FILES include/opusfile.h
|
install(FILES include/opusfile.h
|
||||||
DESTINATION include/opus)
|
DESTINATION include/opus)
|
||||||
|
@ -1,4 +1,8 @@
|
|||||||
Source: opusfile
|
Source: opusfile
|
||||||
Version: 0.9-1
|
Version: 0.9-3
|
||||||
Description: Stand-alone decoder library for .opus streams
|
Description: Stand-alone decoder library for .opus streams
|
||||||
Build-Depends: libogg, opus, openssl
|
Build-Depends: libogg, opus
|
||||||
|
|
||||||
|
Feature: opusurl
|
||||||
|
Description: Support decoding of http(s) streams
|
||||||
|
Build-Depends: openssl
|
||||||
|
@ -12,8 +12,16 @@ vcpkg_from_github(
|
|||||||
|
|
||||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
|
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
|
||||||
|
|
||||||
|
if("opusurl" IN_LIST FEATURES)
|
||||||
|
set(BUILD_OPUSURL ON)
|
||||||
|
else()
|
||||||
|
set(BUILD_OPUSURL OFF)
|
||||||
|
endif()
|
||||||
|
|
||||||
vcpkg_configure_cmake(SOURCE_PATH ${SOURCE_PATH}
|
vcpkg_configure_cmake(SOURCE_PATH ${SOURCE_PATH}
|
||||||
PREFER_NINJA
|
PREFER_NINJA
|
||||||
|
OPTIONS
|
||||||
|
-DBUILD_OPUSURL=${BUILD_OPUSURL}
|
||||||
OPTIONS_DEBUG
|
OPTIONS_DEBUG
|
||||||
-DOPUSFILE_SKIP_HEADERS=ON)
|
-DOPUSFILE_SKIP_HEADERS=ON)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user