mirror of
https://gitee.com/openharmony/third_party_libsnd
synced 2024-11-23 01:49:53 +00:00
cmake: Add config-file package MPEG dependency
This commit is contained in:
parent
59f1622c42
commit
77acc6d362
@ -829,6 +829,12 @@ if (ENABLE_PACKAGE_CONFIG)
|
||||
set (SndFile_WITH_EXTERNAL_LIBS 0)
|
||||
endif ()
|
||||
|
||||
if(ENABLE_MPEG)
|
||||
set (SndFile_WITH_MPEG 1)
|
||||
else ()
|
||||
set (SndFile_WITH_MPEG 0)
|
||||
endif ()
|
||||
|
||||
set (INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_INCLUDEDIR})
|
||||
configure_package_config_file(cmake/SndFileConfig.cmake.in SndFileConfig.cmake
|
||||
INSTALL_DESTINATION ${PROJECT_BINARY_DIR}
|
||||
|
@ -4,6 +4,7 @@ set(SndFile_VERSION_MINOR @PROJECT_VERSION_MINOR@)
|
||||
set(SndFile_VERSION_PATCH @PROJECT_VERSION_PATCH@)
|
||||
|
||||
set (SndFile_WITH_EXTERNAL_LIBS @SndFile_WITH_EXTERNAL_LIBS@)
|
||||
set (SndFile_WITH_MPEG @SndFile_WITH_MPEG@)
|
||||
|
||||
@PACKAGE_INIT@
|
||||
|
||||
@ -16,6 +17,11 @@ if (SndFile_WITH_EXTERNAL_LIBS AND NOT @BUILD_SHARED_LIBS@)
|
||||
find_dependency (Opus)
|
||||
endif ()
|
||||
|
||||
if (SndFile_WITH_MPEG AND NOT @BUILD_SHARED_LIBS@)
|
||||
find_dependency (Lame)
|
||||
find_dependency (MPG123)
|
||||
endif ()
|
||||
|
||||
include (${CMAKE_CURRENT_LIST_DIR}/SndFileTargets.cmake)
|
||||
|
||||
set_and_check (SndFile_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@")
|
||||
|
Loading…
Reference in New Issue
Block a user