mirror of
https://gitee.com/openharmony/third_party_libsnd
synced 2025-02-17 01:20:02 +00:00
Move public headers to include directory
This commit is contained in:
parent
8bff71c07f
commit
acfcd147da
@ -152,7 +152,7 @@ feature_summary (WHAT ALL)
|
||||
|
||||
configure_file (src/config.h.cmake src/config.h)
|
||||
|
||||
configure_file (src/sndfile.h.in src/sndfile.h)
|
||||
configure_file (include/sndfile.h.in include/sndfile.h)
|
||||
|
||||
if (INSTALL_PKGCONFIG_MODULE)
|
||||
|
||||
@ -178,8 +178,8 @@ endif ()
|
||||
|
||||
# Public libsndfile headers
|
||||
set (sndfile_HDRS
|
||||
src/sndfile.hh
|
||||
${CMAKE_CURRENT_BINARY_DIR}/src/sndfile.h
|
||||
include/sndfile.hh
|
||||
${CMAKE_CURRENT_BINARY_DIR}/include/sndfile.h
|
||||
)
|
||||
|
||||
#
|
||||
@ -305,11 +305,14 @@ add_library (sndfile
|
||||
|
||||
add_library (SndFile::sndfile ALIAS sndfile)
|
||||
|
||||
target_include_directories(sndfile
|
||||
target_include_directories (sndfile
|
||||
PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/src>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include>
|
||||
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>
|
||||
PRIVATE
|
||||
src
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/src>
|
||||
)
|
||||
target_link_libraries (sndfile
|
||||
PRIVATE
|
||||
@ -423,6 +426,11 @@ if (BUILD_PROGRAMS)
|
||||
$<$<NOT:$<BOOL:${BEOS}>>:programs/sndfile-play.c>
|
||||
$<$<BOOL:${BEOS}>:programs/sndfile-play-beos.cpp>
|
||||
)
|
||||
target_include_directories (sndfile-play
|
||||
PRIVATE
|
||||
src
|
||||
${CMAKE_CURRENT_BINARY_DIR}/src
|
||||
)
|
||||
target_link_libraries (sndfile-play PRIVATE $<$<BOOL:${LIBM_REQUIRED}>:m>)
|
||||
target_link_libraries (sndfile-play PRIVATE sndfile)
|
||||
if (WIN32)
|
||||
@ -452,6 +460,12 @@ if (BUILD_PROGRAMS)
|
||||
programs/common.c
|
||||
programs/common.h
|
||||
)
|
||||
target_include_directories (sndfile-cmp
|
||||
PUBLIC
|
||||
src
|
||||
${CMAKE_CURRENT_BINARY_DIR}/src
|
||||
${CMAKE_CURRENT_BINARY_DIR}/tests
|
||||
)
|
||||
target_link_libraries (sndfile-cmp PRIVATE sndfile $<$<BOOL:${LIBM_REQUIRED}>:m>)
|
||||
|
||||
# sndfile-metadata-set
|
||||
@ -461,6 +475,12 @@ if (BUILD_PROGRAMS)
|
||||
programs/common.c
|
||||
programs/common.h
|
||||
)
|
||||
target_include_directories (sndfile-metadata-set
|
||||
PUBLIC
|
||||
src
|
||||
${CMAKE_CURRENT_BINARY_DIR}/src
|
||||
${CMAKE_CURRENT_BINARY_DIR}/tests
|
||||
)
|
||||
target_link_libraries (sndfile-metadata-set PRIVATE sndfile $<$<BOOL:${LIBM_REQUIRED}>:m>)
|
||||
|
||||
# sndfile-metadata-get
|
||||
@ -470,6 +490,12 @@ if (BUILD_PROGRAMS)
|
||||
programs/common.c
|
||||
programs/common.h
|
||||
)
|
||||
target_include_directories (sndfile-metadata-get
|
||||
PUBLIC
|
||||
src
|
||||
${CMAKE_CURRENT_BINARY_DIR}/src
|
||||
${CMAKE_CURRENT_BINARY_DIR}/tests
|
||||
)
|
||||
target_link_libraries (sndfile-metadata-get PRIVATE sndfile $<$<BOOL:${LIBM_REQUIRED}>:m>)
|
||||
|
||||
# sndfile-interleave
|
||||
@ -506,6 +532,12 @@ if (BUILD_PROGRAMS)
|
||||
programs/common.c
|
||||
programs/common.h
|
||||
)
|
||||
target_include_directories (sndfile-salvage
|
||||
PUBLIC
|
||||
src
|
||||
${CMAKE_CURRENT_BINARY_DIR}/src
|
||||
${CMAKE_CURRENT_BINARY_DIR}/tests
|
||||
)
|
||||
target_link_libraries (sndfile-salvage PRIVATE sndfile $<$<BOOL:${LIBM_REQUIRED}>:m>)
|
||||
|
||||
set (SNDFILE_PROGRAM_TARGETS
|
||||
@ -598,6 +630,12 @@ if (BUILD_REGTEST)
|
||||
regtest/database.c
|
||||
regtest/checksum.c
|
||||
)
|
||||
target_include_directories (sndfile-regtest
|
||||
PUBLIC
|
||||
src
|
||||
${CMAKE_CURRENT_BINARY_DIR}/src
|
||||
${CMAKE_CURRENT_BINARY_DIR}/tests
|
||||
)
|
||||
target_link_libraries(sndfile-regtest
|
||||
PRIVATE
|
||||
sndfile
|
||||
@ -739,8 +777,13 @@ if (BUILD_TESTING)
|
||||
|
||||
# utils static library
|
||||
add_library(test_utils STATIC tests/utils.c)
|
||||
target_include_directories (test_utils
|
||||
PUBLIC
|
||||
src
|
||||
${CMAKE_CURRENT_BINARY_DIR}/src
|
||||
${CMAKE_CURRENT_BINARY_DIR}/tests
|
||||
)
|
||||
target_link_libraries(test_utils PRIVATE sndfile)
|
||||
target_include_directories(test_utils PUBLIC "${CMAKE_CURRENT_BINARY_DIR}/tests")
|
||||
|
||||
### test_main
|
||||
|
||||
@ -760,6 +803,12 @@ if (BUILD_TESTING)
|
||||
src/test_binheader_writef.c
|
||||
src/test_nms_adpcm.c
|
||||
)
|
||||
target_include_directories (test_main
|
||||
PUBLIC
|
||||
src
|
||||
${CMAKE_CURRENT_BINARY_DIR}/src
|
||||
${CMAKE_CURRENT_BINARY_DIR}/tests
|
||||
)
|
||||
target_link_libraries (test_main PRIVATE sndfile)
|
||||
if (MSVC)
|
||||
target_compile_definitions (test_main PRIVATE _USE_MATH_DEFINES)
|
||||
@ -769,6 +818,11 @@ if (BUILD_TESTING)
|
||||
### sfversion_test
|
||||
|
||||
add_executable (sfversion tests/sfversion.c)
|
||||
target_include_directories (sfversion
|
||||
PRIVATE
|
||||
src
|
||||
${CMAKE_CURRENT_BINARY_DIR}/src
|
||||
)
|
||||
target_link_libraries (sfversion sndfile)
|
||||
add_test (sfversion sfversion)
|
||||
set_tests_properties (sfversion PROPERTIES
|
||||
@ -1125,6 +1179,11 @@ if (BUILD_TESTING)
|
||||
### g72x_test
|
||||
|
||||
add_executable (g72x_test src/G72x/g72x_test.c)
|
||||
target_include_directories (g72x_test
|
||||
PRIVATE
|
||||
src
|
||||
${CMAKE_CURRENT_BINARY_DIR}/src
|
||||
)
|
||||
target_link_libraries (g72x_test
|
||||
PRIVATE
|
||||
sndfile
|
||||
|
@ -1,6 +1,6 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
AM_CPPFLAGS = -I$(top_srcdir)/src $(OS_SPECIFIC_CFLAGS)
|
||||
AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/include -I$(top_builddir)/include $(OS_SPECIFIC_CFLAGS)
|
||||
|
||||
DISTCHECK_CONFIGURE_FLAGS = --enable-werror
|
||||
|
||||
@ -41,7 +41,7 @@ BUILT_SOURCES = src/test_endswap.c
|
||||
|
||||
SYMBOL_FILES = src/Symbols.gnu-binutils src/Symbols.darwin src/libsndfile-1.def src/Symbols.os2 src/Symbols.static
|
||||
|
||||
EXTRA_DIST += src/sndfile.h.in src/config.h.in src/test_endswap.tpl src/test_endswap.def \
|
||||
EXTRA_DIST += include/sndfile.h.in src/config.h.in src/test_endswap.tpl src/test_endswap.def \
|
||||
$(SYMBOL_FILES) src/create_symbols_file.py src/binheader_writef_check.py \
|
||||
src/GSM610/README src/GSM610/COPYRIGHT src/GSM610/ChangeLog \
|
||||
src/G72x/README src/G72x/README.original src/G72x/ChangeLog \
|
||||
@ -57,8 +57,8 @@ endif
|
||||
#===============================================================================
|
||||
|
||||
lib_LTLIBRARIES = src/libsndfile.la
|
||||
include_HEADERS = src/sndfile.hh
|
||||
nodist_include_HEADERS = src/sndfile.h
|
||||
include_HEADERS = include/sndfile.hh
|
||||
nodist_include_HEADERS = include/sndfile.h
|
||||
src_libsndfile_la_CFLAGS = $(EXTERNAL_XIPH_CFLAGS)
|
||||
# MinGW requires -no-undefined if a DLL is to be built.
|
||||
src_libsndfile_la_LDFLAGS = -no-undefined -version-info $(SHARED_VERSION_INFO) $(SHLIB_VERSION_ARG)
|
||||
|
@ -672,7 +672,7 @@ AC_SUBST(TEST_BINDIR)
|
||||
|
||||
AC_CONFIG_FILES([
|
||||
Makefile Octave/Makefile
|
||||
src/version-metadata.rc src/sndfile.h
|
||||
src/version-metadata.rc include/sndfile.h
|
||||
tests/test_wrapper.sh tests/pedantic-header-test.sh
|
||||
doc/libsndfile.css libsndfile.spec sndfile.pc
|
||||
Scripts/build-test-tarball.mk
|
||||
|
@ -42,7 +42,7 @@ if test -n "@GCC_MAJOR_VERSION@" ; then
|
||||
|
||||
CC=`echo "@CC@" | sed "s/.*shave cc //"`
|
||||
# Compile with -Werror and -pedantic.
|
||||
$CC -std=c99 -Werror -pedantic -I@top_srcdir@/src -I@abs_top_builddir@/src -c @top_srcdir@/tests/sfversion.c -o /dev/null
|
||||
$CC -std=c99 -Werror -pedantic -I@top_srcdir@/src -I@abs_top_builddir@/src -I@abs_top_builddir@/include -c @top_srcdir@/tests/sfversion.c -o /dev/null
|
||||
|
||||
# Check compiler return status.
|
||||
if test $? -ne 0 ; then
|
||||
|
Loading…
x
Reference in New Issue
Block a user