mirror of
https://gitee.com/openharmony/third_party_libsnd
synced 2024-11-23 01:49:53 +00:00
CMake: updates & fixes
This commit is contained in:
parent
b0453860db
commit
6710ff3fc6
30
.gitignore
vendored
30
.gitignore
vendored
@ -6,15 +6,6 @@
|
|||||||
*.au
|
*.au
|
||||||
*.bin
|
*.bin
|
||||||
*.caf
|
*.caf
|
||||||
/*.cmake
|
|
||||||
/src/*.cmake
|
|
||||||
/src/ALAC/*.cmake
|
|
||||||
/src/G72x/*.cmake
|
|
||||||
/src/GSM610/*.cmake
|
|
||||||
/tests/*.cmake
|
|
||||||
/programs/*.cmake
|
|
||||||
!src/config.h.cmake
|
|
||||||
!*.in.cmake
|
|
||||||
*.dll
|
*.dll
|
||||||
*.exe
|
*.exe
|
||||||
*.flac
|
*.flac
|
||||||
@ -40,11 +31,6 @@
|
|||||||
.deps
|
.deps
|
||||||
.dirstamp
|
.dirstamp
|
||||||
.libs
|
.libs
|
||||||
Build/
|
|
||||||
CMake/config.h.in
|
|
||||||
CMakeFiles
|
|
||||||
CMakeCache.txt
|
|
||||||
build-aux
|
|
||||||
Hack
|
Hack
|
||||||
Hack/sndfile-fuzzbomb
|
Hack/sndfile-fuzzbomb
|
||||||
INSTALL
|
INSTALL
|
||||||
@ -139,3 +125,19 @@ Release/
|
|||||||
bin/
|
bin/
|
||||||
obj/
|
obj/
|
||||||
octave-workspace
|
octave-workspace
|
||||||
|
|
||||||
|
CMakeCache.txt
|
||||||
|
CMakeFiles
|
||||||
|
CMakeScripts
|
||||||
|
Testing
|
||||||
|
Makefile
|
||||||
|
cmake_install.cmake
|
||||||
|
install_manifest.txt
|
||||||
|
compile_commands.json
|
||||||
|
CTestTestfile.cmake
|
||||||
|
CMakeSettings.json
|
||||||
|
|
||||||
|
/*[Bb]uild*/
|
||||||
|
|
||||||
|
/.vscode/
|
||||||
|
/.vs/
|
||||||
|
@ -40,7 +40,7 @@ install:
|
|||||||
- true
|
- true
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- mkdir cmake-build && (cd cmake-build && cmake .. -DCMAKE_BUILD_TYPE=Release && make VERBOSE=1 && ctest -V)
|
- mkdir cmake-build && (cd cmake-build && cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS="-Wall -Wextra" && make VERBOSE=1 && ctest -V)
|
||||||
- pwd
|
- pwd
|
||||||
- ./autogen.sh
|
- ./autogen.sh
|
||||||
- ./configure --enable-werror && make clean all check && make distcheck
|
- ./configure --enable-werror && make clean all check && make distcheck
|
||||||
|
1174
CMakeLists.txt
1174
CMakeLists.txt
File diff suppressed because it is too large
Load Diff
@ -14,15 +14,14 @@ endif
|
|||||||
|
|
||||||
EXTRA_DIST = libsndfile.spec.in sndfile.pc.in Scripts/android-configure.sh \
|
EXTRA_DIST = libsndfile.spec.in sndfile.pc.in Scripts/android-configure.sh \
|
||||||
Scripts/linux-to-win-cross-configure.sh \
|
Scripts/linux-to-win-cross-configure.sh \
|
||||||
CMakeLists.txt $(cmake_files) sndfile.pc.cmake.in Win32
|
CMakeLists.txt $(cmake_files) Win32
|
||||||
|
|
||||||
cmake_files = cmake/ClipMode.cmake cmake/FindFLAC.cmake \
|
cmake_files = cmake/ClipMode.cmake cmake/FindFLAC.cmake \
|
||||||
cmake/CMakeAutoGen.cmake cmake/CMakeAutoGenScript.cmake \
|
cmake/CMakeAutoGen.cmake cmake/CMakeAutoGenScript.cmake \
|
||||||
cmake/FindFLAC.cmake cmake/FindOgg.cmake cmake/FindSndio.cmake \
|
cmake/FindOgg.cmake cmake/FindVorbis.cmake cmake/FindSndio.cmake \
|
||||||
cmake/FindSpeex.cmake cmake/FindSQLite3.cmake cmake/FindVorbis.cmake \
|
cmake/FindSpeex.cmake cmake/FindSQLite3.cmake cmake/FindVorbisEnc.cmake \
|
||||||
cmake/SndFileChecks.cmake cmake/TestInline.cmake \
|
cmake/SndFileChecks.cmake cmake/TestInline.cmake \
|
||||||
cmake/TestLargeFiles.cmake cmake/LibSndFileConfig.cmake.in \
|
cmake/TestLargeFiles.cmake cmake/TestInline.c.in
|
||||||
cmake/TestInline.c.in
|
|
||||||
|
|
||||||
pkgconfig_DATA = sndfile.pc
|
pkgconfig_DATA = sndfile.pc
|
||||||
|
|
||||||
|
@ -9,31 +9,50 @@
|
|||||||
if (FLAC_INCLUDE_DIR)
|
if (FLAC_INCLUDE_DIR)
|
||||||
# Already in cache, be silent
|
# Already in cache, be silent
|
||||||
set (FLAC_FIND_QUIETLY TRUE)
|
set (FLAC_FIND_QUIETLY TRUE)
|
||||||
endif (FLAC_INCLUDE_DIR)
|
endif ()
|
||||||
|
|
||||||
find_package (Ogg QUIET)
|
find_package (Ogg QUIET)
|
||||||
|
|
||||||
find_package (PkgConfig QUIET)
|
find_package (PkgConfig QUIET)
|
||||||
pkg_check_modules(PC_FLAC QUIET flac)
|
pkg_check_modules(PC_FLAC QUIET flac)
|
||||||
|
|
||||||
|
set(FLAC_VERSION ${PC_FLAC_VERSION})
|
||||||
|
|
||||||
find_path (FLAC_INCLUDE_DIR FLAC/stream_decoder.h
|
find_path (FLAC_INCLUDE_DIR FLAC/stream_decoder.h
|
||||||
HINTS ${PC_FLAC_INCLUDEDIR} ${PC_FLAC_INCLUDE_DIRS} ${FLAC_ROOT}
|
HINTS
|
||||||
PATH_SUFFIXES include)
|
${PC_FLAC_INCLUDEDIR}
|
||||||
|
${PC_FLAC_INCLUDE_DIRS}
|
||||||
|
${FLAC_ROOT}
|
||||||
|
)
|
||||||
|
|
||||||
# MSVC built libraries can name them *_static, which is good as it
|
# MSVC built libraries can name them *_static, which is good as it
|
||||||
# distinguishes import libraries from static libraries with the same extension.
|
# distinguishes import libraries from static libraries with the same extension.
|
||||||
find_library (FLAC_LIBRARY NAMES FLAC libFLAC libFLAC_dynamic libFLAC_static
|
find_library (FLAC_LIBRARY
|
||||||
HINTS ${PC_FLAC_LIBDIR} ${PC_FLAC_LIBRARY_DIRS} ${FLAC_ROOT}
|
NAMES
|
||||||
PATH_SUFFIXES lib)
|
FLAC
|
||||||
|
libFLAC
|
||||||
|
libFLAC_dynamic
|
||||||
|
libFLAC_static
|
||||||
|
HINTS
|
||||||
|
${PC_FLAC_LIBDIR}
|
||||||
|
${PC_FLAC_LIBRARY_DIRS}
|
||||||
|
${FLAC_ROOT}
|
||||||
|
)
|
||||||
|
|
||||||
# Handle the QUIETLY and REQUIRED arguments and set FLAC_FOUND to TRUE if
|
# Handle the QUIETLY and REQUIRED arguments and set FLAC_FOUND to TRUE if
|
||||||
# all listed variables are TRUE.
|
# all listed variables are TRUE.
|
||||||
include (FindPackageHandleStandardArgs)
|
include (FindPackageHandleStandardArgs)
|
||||||
find_package_handle_standard_args (FLAC DEFAULT_MSG
|
find_package_handle_standard_args (FLAC
|
||||||
FLAC_INCLUDE_DIR FLAC_LIBRARY)
|
REQUIRED_VARS
|
||||||
|
FLAC_LIBRARY
|
||||||
|
FLAC_INCLUDE_DIR
|
||||||
|
OGG_FOUND
|
||||||
|
VERSION_VAR
|
||||||
|
FLAC_VERSION
|
||||||
|
)
|
||||||
|
|
||||||
if (FLAC_FOUND)
|
if (FLAC_FOUND)
|
||||||
set (FLAC_INCLUDE_DIRS ${FLAC_INCLUDE_DIR} ${OGG_INCLUDE_DIRS})
|
set (FLAC_INCLUDE_DIRS ${FLAC_INCLUDE_DIR})
|
||||||
set (FLAC_LIBRARIES ${FLAC_LIBRARY} ${OGG_LIBRARIES})
|
set (FLAC_LIBRARIES ${FLAC_LIBRARY} ${OGG_LIBRARIES})
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
set (FLAC_LIBRARIES ${FLAC_LIBRARIES} wsock32)
|
set (FLAC_LIBRARIES ${FLAC_LIBRARIES} wsock32)
|
||||||
@ -41,7 +60,18 @@ if (FLAC_FOUND)
|
|||||||
if (FLAC_LIBRARY_FILENAME MATCHES "libFLAC_static")
|
if (FLAC_LIBRARY_FILENAME MATCHES "libFLAC_static")
|
||||||
set (FLAC_DEFINITIONS -DFLAC__NO_DLL)
|
set (FLAC_DEFINITIONS -DFLAC__NO_DLL)
|
||||||
endif ()
|
endif ()
|
||||||
endif (WIN32)
|
endif ()
|
||||||
endif (FLAC_FOUND)
|
if (NOT TARGET FLAC::FLAC)
|
||||||
|
add_library(FLAC::FLAC UNKNOWN IMPORTED)
|
||||||
|
set_target_properties(FLAC::FLAC PROPERTIES
|
||||||
|
INTERFACE_INCLUDE_DIRECTORIES "${FLAC_INCLUDE_DIR}"
|
||||||
|
IMPORTED_LOCATION "${FLAC_LIBRARY}"
|
||||||
|
INTERFACE_LINK_LIBRARIES
|
||||||
|
Ogg::Ogg
|
||||||
|
$<$<BOOL:${WIN32}>:wsock32>
|
||||||
|
INTERFACE_COMPILE_DEFINITIONS ${FLAC_DEFINITIONS}
|
||||||
|
)
|
||||||
|
endif ()
|
||||||
|
endif ()
|
||||||
|
|
||||||
mark_as_advanced(FLAC_INCLUDE_DIR FLAC_LIBRARY)
|
mark_as_advanced(FLAC_INCLUDE_DIR FLAC_LIBRARY)
|
||||||
|
@ -3,28 +3,59 @@
|
|||||||
#
|
#
|
||||||
# OGG_INCLUDE_DIRS - where to find ogg.h, etc.
|
# OGG_INCLUDE_DIRS - where to find ogg.h, etc.
|
||||||
# OGG_LIBRARIES - List of libraries when using ogg.
|
# OGG_LIBRARIES - List of libraries when using ogg.
|
||||||
# Ogg_FOUND - True if ogg found.
|
# OGG_FOUND - True if ogg found.
|
||||||
|
|
||||||
if(OGG_INCLUDE_DIR)
|
if (OGG_INCLUDE_DIR)
|
||||||
# Already in cache, be silent
|
# Already in cache, be silent
|
||||||
set(OGG_FIND_QUIETLY TRUE)
|
set(OGG_FIND_QUIETLY TRUE)
|
||||||
endif(OGG_INCLUDE_DIR)
|
endif ()
|
||||||
|
|
||||||
find_package (PkgConfig QUIET)
|
find_package (PkgConfig QUIET)
|
||||||
pkg_check_modules(PC_OGG QUIET ogg)
|
pkg_check_modules (PC_OGG QUIET ogg)
|
||||||
|
|
||||||
find_path(OGG_INCLUDE_DIR ogg/ogg.h HINTS ${PC_OGG_INCLUDEDIR} ${PC_OGG_INCLUDE_DIRS} ${OGG_ROOT} PATH_SUFFIXES include)
|
set (OGG_VERSION ${PC_OGG_VERSION})
|
||||||
|
|
||||||
|
find_path (OGG_INCLUDE_DIR ogg/ogg.h
|
||||||
|
HINTS
|
||||||
|
${PC_OGG_INCLUDEDIR}
|
||||||
|
${PC_OGG_INCLUDE_DIRS}
|
||||||
|
${OGG_ROOT}
|
||||||
|
)
|
||||||
# MSVC built ogg may be named ogg_static.
|
# MSVC built ogg may be named ogg_static.
|
||||||
# The provided project files name the library with the lib prefix.
|
# The provided project files name the library with the lib prefix.
|
||||||
find_library(OGG_LIBRARY NAMES ogg ogg_static libogg libogg_static HINTS ${PC_OGG_LIBDIR} ${PC_OGG_LIBRARY_DIRS} ${OGG_ROOT} PATH_SUFFIXES lib)
|
find_library (OGG_LIBRARY
|
||||||
|
NAMES
|
||||||
|
ogg
|
||||||
|
ogg_static
|
||||||
|
libogg
|
||||||
|
libogg_static
|
||||||
|
HINTS
|
||||||
|
${PC_OGG_LIBDIR}
|
||||||
|
${PC_OGG_LIBRARY_DIRS}
|
||||||
|
${OGG_ROOT}
|
||||||
|
)
|
||||||
# Handle the QUIETLY and REQUIRED arguments and set OGG_FOUND
|
# Handle the QUIETLY and REQUIRED arguments and set OGG_FOUND
|
||||||
# to TRUE if all listed variables are TRUE.
|
# to TRUE if all listed variables are TRUE.
|
||||||
include(FindPackageHandleStandardArgs)
|
include (FindPackageHandleStandardArgs)
|
||||||
find_package_handle_standard_args(Ogg DEFAULT_MSG OGG_INCLUDE_DIR OGG_LIBRARY)
|
find_package_handle_standard_args (Ogg
|
||||||
|
REQUIRED_VARS
|
||||||
|
OGG_LIBRARY
|
||||||
|
OGG_INCLUDE_DIR
|
||||||
|
VERSION_VAR
|
||||||
|
OGG_VERSION
|
||||||
|
)
|
||||||
|
|
||||||
if (OGG_FOUND)
|
if (OGG_FOUND)
|
||||||
set (OGG_LIBRARIES ${OGG_LIBRARY})
|
set (OGG_LIBRARIES ${OGG_LIBRARY})
|
||||||
set (OGG_INCLUDE_DIRS ${OGG_INCLUDE_DIR})
|
set (OGG_INCLUDE_DIRS ${OGG_INCLUDE_DIR})
|
||||||
endif (OGG_FOUND)
|
|
||||||
|
if(NOT TARGET Ogg::Ogg)
|
||||||
|
add_library(Ogg::Ogg UNKNOWN IMPORTED)
|
||||||
|
set_target_properties(Ogg::Ogg PROPERTIES
|
||||||
|
INTERFACE_INCLUDE_DIRECTORIES "${OGG_INCLUDE_DIRS}"
|
||||||
|
IMPORTED_LOCATION "${OGG_LIBRARIES}"
|
||||||
|
)
|
||||||
|
endif ()
|
||||||
|
endif ()
|
||||||
|
|
||||||
mark_as_advanced(OGG_INCLUDE_DIR OGG_LIBRARY)
|
mark_as_advanced (OGG_INCLUDE_DIR OGG_LIBRARY)
|
||||||
|
@ -5,25 +5,52 @@
|
|||||||
# SQLITE3_LIBRARIES - List of libraries when using SQLITE3.
|
# SQLITE3_LIBRARIES - List of libraries when using SQLITE3.
|
||||||
# SQLITE3_FOUND - True if SQLITE3 found.
|
# SQLITE3_FOUND - True if SQLITE3 found.
|
||||||
|
|
||||||
if(SQLITE3_INCLUDE_DIR)
|
if (SQLITE3_INCLUDE_DIR)
|
||||||
# Already in cache, be silent
|
# Already in cache, be silent
|
||||||
set(SQLITE3_FIND_QUIETLY TRUE)
|
set (SQLITE3_FIND_QUIETLY TRUE)
|
||||||
endif(SQLITE3_INCLUDE_DIR)
|
endif ()
|
||||||
|
|
||||||
find_package (PkgConfig QUIET)
|
find_package (PkgConfig QUIET)
|
||||||
pkg_check_modules(PC_SQLITE3 QUIET sqlite3)
|
pkg_check_modules (PC_SQLITE3 QUIET sqlite3)
|
||||||
|
|
||||||
find_path(SQLITE3_INCLUDE_DIR sqlite3.h HINTS ${PC_SQLITE3_INCLUDEDIR} ${PC_SQLITE3_INCLUDE_DIRS} ${SQLITE3_ROOT})
|
set (SQLITE3_VERSION ${PC_SQLITE3_VERSION})
|
||||||
|
|
||||||
find_library (SQLITE3_LIBRARY NAMES sqlite3 HINTS ${PC_SQLITE3_LIBDIR} ${PC_SQLITE3_LIBRARY_DIRS} ${SQLITE3_ROOT} PATH_SUFFIXES lib)
|
find_path (SQLITE3_INCLUDE_DIR sqlite3.h
|
||||||
|
HINTS
|
||||||
|
${PC_SQLITE3_INCLUDEDIR}
|
||||||
|
${PC_SQLITE3_INCLUDE_DIRS}
|
||||||
|
${SQLITE3_ROOT}
|
||||||
|
)
|
||||||
|
|
||||||
include(FindPackageHandleStandardArgs)
|
find_library (SQLITE3_LIBRARY
|
||||||
|
NAMES
|
||||||
|
sqlite3
|
||||||
|
HINTS
|
||||||
|
${PC_SQLITE3_LIBDIR}
|
||||||
|
${PC_SQLITE3_LIBRARY_DIRS}
|
||||||
|
${SQLITE3_ROOT}
|
||||||
|
)
|
||||||
|
|
||||||
find_package_handle_standard_args(SQLITE3 DEFAULT_MSG SQLITE3_INCLUDE_DIR SQLITE3_LIBRARY)
|
include (FindPackageHandleStandardArgs)
|
||||||
|
|
||||||
|
find_package_handle_standard_args (SQLITE3
|
||||||
|
REQUIRED_VARS
|
||||||
|
SQLITE3_LIBRARY
|
||||||
|
SQLITE3_INCLUDE_DIR
|
||||||
|
VERSION_VAR
|
||||||
|
SQLITE3_VERSION
|
||||||
|
)
|
||||||
|
|
||||||
if (SQLITE3_FOUND)
|
if (SQLITE3_FOUND)
|
||||||
set (SQLITE3_INCLUDE_DIRS ${SQLITE3_INCLUDE_DIR})
|
set (SQLITE3_INCLUDE_DIRS ${SQLITE3_INCLUDE_DIR})
|
||||||
set (SQLITE3_LIBRARIES ${SQLITE3_LIBRARY})
|
set (SQLITE3_LIBRARIES ${SQLITE3_LIBRARY})
|
||||||
endif (SQLITE3_FOUND)
|
if (NOT TARGET SQLite3::SQLite3)
|
||||||
|
add_library (SQLite3::SQLite3 UNKNOWN IMPORTED)
|
||||||
|
set_target_properties (SQLite3::SQLite3 PROPERTIES
|
||||||
|
INTERFACE_INCLUDE_DIRECTORIES "${SQLITE3_INCLUDE_DIRS}"
|
||||||
|
IMPORTED_LOCATION "${SQLITE3_LIBRARIES}"
|
||||||
|
)
|
||||||
|
endif ()
|
||||||
|
endif ()
|
||||||
|
|
||||||
mark_as_advanced(SQLITE3_INCLUDE_DIR SQLITE3_LIBRARY)
|
mark_as_advanced (SQLITE3_INCLUDE_DIR SQLITE3_LIBRARY)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# - Find SoundIO (sndio) includes and libraries
|
# - Find SoundIO (sndio) includes and libraries
|
||||||
#
|
#
|
||||||
# Sndio_FOUND - True if SNDIO_INCLUDE_DIR & SNDIO_LIBRARY are
|
# SNDIO_FOUND - True if SNDIO_INCLUDE_DIR & SNDIO_LIBRARY are
|
||||||
# found
|
# found
|
||||||
# SNDIO_LIBRARIES - Set when SNDIO_LIBRARY is found
|
# SNDIO_LIBRARIES - Set when SNDIO_LIBRARY is found
|
||||||
# SNDIO_INCLUDE_DIRS - Set when SNDIO_INCLUDE_DIR is found
|
# SNDIO_INCLUDE_DIRS - Set when SNDIO_INCLUDE_DIR is found
|
||||||
#
|
#
|
||||||
@ -9,25 +9,53 @@
|
|||||||
# SNDIO_LIBRARY - the sndio library
|
# SNDIO_LIBRARY - the sndio library
|
||||||
#
|
#
|
||||||
|
|
||||||
find_path(SNDIO_INCLUDE_DIR
|
if (SNDIO_INCLUDE_DIR)
|
||||||
NAMES sndio.h
|
# Already in cache, be silent
|
||||||
DOC "The SoundIO include directory"
|
set (SNDIO_FIND_QUIETLY TRUE)
|
||||||
)
|
endif ()
|
||||||
|
|
||||||
find_library(SNDIO_LIBRARY
|
find_package (PkgConfig QUIET)
|
||||||
NAMES sndio
|
pkg_check_modules (PC_SNDIO QUIET sndio)
|
||||||
DOC "The SoundIO library"
|
|
||||||
)
|
|
||||||
|
|
||||||
include(FindPackageHandleStandardArgs)
|
set (SNDIO_VERSION ${PC_SNDIO_VERSION})
|
||||||
find_package_handle_standard_args(Sndio
|
|
||||||
REQUIRED_VARS SNDIO_LIBRARY SNDIO_INCLUDE_DIR
|
|
||||||
)
|
|
||||||
|
|
||||||
if(Sndio_FOUND)
|
find_path (SNDIO_INCLUDE_DIR
|
||||||
set(SNDIO_LIBRARIES ${SNDIO_LIBRARY})
|
NAMES
|
||||||
set(SNDIO_INCLUDE_DIRS ${SNDIO_INCLUDE_DIR})
|
sndio.h
|
||||||
|
HINTS
|
||||||
|
${PC_SNDIO_INCLUDEDIR}
|
||||||
|
${PC_SNDIO_INCLUDE_DIRS}
|
||||||
|
${SNDIO_ROOT}
|
||||||
|
)
|
||||||
|
|
||||||
|
find_library (SNDIO_LIBRARY
|
||||||
|
NAMES
|
||||||
|
sndio
|
||||||
|
HINTS
|
||||||
|
${PC_SNDIO_LIBDIR}
|
||||||
|
${PC_SNDIO_LIBRARY_DIRS}
|
||||||
|
${SNDIO_ROOT}
|
||||||
|
)
|
||||||
|
|
||||||
|
include (FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args (Sndio
|
||||||
|
REQUIRED_VARS
|
||||||
|
SNDIO_LIBRARY
|
||||||
|
SNDIO_INCLUDE_DIR
|
||||||
|
VERSION_VAR
|
||||||
|
SNDIO_VERSION
|
||||||
|
)
|
||||||
|
|
||||||
|
if (SNDIO_FOUND)
|
||||||
|
set (SNDIO_LIBRARIES ${SNDIO_LIBRARY})
|
||||||
|
set (SNDIO_INCLUDE_DIRS ${SNDIO_INCLUDE_DIR})
|
||||||
|
if (NOT TARGET Sndio::Sndio)
|
||||||
|
add_library (Sndio::Sndio UNKNOWN IMPORTED)
|
||||||
|
set_target_properties (Sndio::Sndio PROPERTIES
|
||||||
|
INTERFACE_INCLUDE_DIRECTORIES "${SNDIO_INCLUDE_DIRS}"
|
||||||
|
IMPORTED_LOCATION "${SNDIO_LIBRARIES}"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
mark_as_advanced(SNDIO_INCLUDE_DIR SNDIO_LIBRARY)
|
mark_as_advanced (SNDIO_INCLUDE_DIR SNDIO_LIBRARY)
|
||||||
|
|
||||||
|
@ -1,25 +1,55 @@
|
|||||||
# - Find Speex
|
# - Find Speex
|
||||||
# Find the native Speex includes and libraries
|
# Find the native Speex includes and libraries
|
||||||
#
|
#
|
||||||
# SPEEX_INCLUDE_DIRS - where to find speex.h, etc.
|
# SPEEX_INCLUDE_DIRS - where to find speex.h, etc.
|
||||||
# SPEEX_LIBRARIES - List of libraries when using Speex.
|
# SPEEX_LIBRARIES - List of libraries when using Speex.
|
||||||
# Speex_FOUND - True if Speex found.
|
# SPEEX_FOUND - True if Speex found.
|
||||||
|
|
||||||
if (SPEEX_INCLUDE_DIR)
|
if (SPEEX_INCLUDE_DIR)
|
||||||
set (SPEEX_FIND_QUIETLY TRUE)
|
set (SPEEX_FIND_QUIETLY TRUE)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
find_package (PkgConfig QUIET)
|
find_package (PkgConfig QUIET)
|
||||||
pkg_check_modules(PC_SPEEX QUIET speex)
|
pkg_check_modules (PC_SPEEX QUIET speex)
|
||||||
|
|
||||||
find_path (SPEEX_INCLUDE_DIR speex/speex.h HINTS ${PC_SPEEX_INCLUDEDIR} ${PC_SPEEX_INCLUDE_DIRS} ${SPEEX_ROOT} PATH_SUFFIXES include)
|
set (SPEEX_VERSION ${PC_SPEEX_VERSION})
|
||||||
find_library (SPEEX_LIBRARY NAMES speex HINTS ${PC_SPEEX_LIBDIR} ${PC_SPEEX_LIBRARY_DIRS} ${SPEEX_ROOT} PATH_SUFFIXES lib)
|
|
||||||
|
|
||||||
include(FindPackageHandleStandardArgs)
|
find_path (SPEEX_INCLUDE_DIR speex/speex.h
|
||||||
find_package_handle_standard_args(Speex DEFAULT_MSG SPEEX_INCLUDE_DIR SPEEX_LIBRARY)
|
HINTS
|
||||||
|
${PC_SPEEX_INCLUDEDIR}
|
||||||
|
${PC_SPEEX_INCLUDE_DIRS}
|
||||||
|
${SPEEX_ROOT}
|
||||||
|
)
|
||||||
|
find_library (SPEEX_LIBRARY
|
||||||
|
NAMES
|
||||||
|
speex
|
||||||
|
libspeex
|
||||||
|
HINTS
|
||||||
|
${PC_SPEEX_LIBDIR}
|
||||||
|
${PC_SPEEX_LIBRARY_DIRS}
|
||||||
|
${SPEEX_ROOT}
|
||||||
|
)
|
||||||
|
|
||||||
|
include (FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args (Speex
|
||||||
|
REQUIRED_VARS
|
||||||
|
SPEEX_LIBRARY
|
||||||
|
SPEEX_INCLUDE_DIR
|
||||||
|
VERSION_VAR
|
||||||
|
SPEEX_VERSION
|
||||||
|
)
|
||||||
|
|
||||||
|
if (SPEEX_FOUND)
|
||||||
|
set (SPEEX_LIBRARIES ${SPEEX_LIBRARY})
|
||||||
|
set (SPEEX_INCLUDE_DIRS ${SPEEX_INCLUDE_DIR})
|
||||||
|
|
||||||
|
if (NOT TARGET Speex::Speex)
|
||||||
|
add_library (Speex::Speex UNKNOWN IMPORTED)
|
||||||
|
set_target_properties (Speex::Speex PROPERTIES
|
||||||
|
INTERFACE_INCLUDE_DIRECTORIES "${SPEEX_INCLUDE_DIRS}"
|
||||||
|
IMPORTED_LOCATION "${SPEEX_LIBRARIES}"
|
||||||
|
)
|
||||||
|
endif ()
|
||||||
|
endif ()
|
||||||
|
|
||||||
mark_as_advanced (SPEEX_INCLUDE_DIR SPEEX_LIBRARY)
|
mark_as_advanced (SPEEX_INCLUDE_DIR SPEEX_LIBRARY)
|
||||||
|
|
||||||
set(SPEEX_INCLUDE_DIRS ${SPEEX_INCLUDE_DIR})
|
|
||||||
set(SPEEX_LIBRARIES ${SPEEX_LIBRARY})
|
|
||||||
|
|
||||||
|
@ -1,49 +1,64 @@
|
|||||||
# - Find vorbis
|
# - Find vorbisenc
|
||||||
# Find the native vorbis includes and libraries
|
# Find the native vorbisenc includes and libraries
|
||||||
#
|
#
|
||||||
# VORBIS_INCLUDE_DIRS - where to find vorbis.h, etc.
|
# VORBIS_INCLUDE_DIRS - where to find vorbis.h, etc.
|
||||||
# VORBIS_LIBRARIES - List of libraries when using vorbis(file).
|
# VORBIS_LIBRARIES - List of libraries when using vorbis.
|
||||||
# Vorbis_FOUND - True if vorbis found.
|
# VORBIS_FOUND - True if vorbis found.
|
||||||
|
|
||||||
if(VORBIS_INCLUDE_DIR)
|
if (VORBIS_INCLUDE_DIR)
|
||||||
# Already in cache, be silent
|
# Already in cache, be silent
|
||||||
set(VORBIS_FIND_QUIETLY TRUE)
|
set (VORBIS_FIND_QUIETLY TRUE)
|
||||||
endif(VORBIS_INCLUDE_DIR)
|
endif ()
|
||||||
|
|
||||||
find_package (Ogg QUIET)
|
find_package (Ogg QUIET)
|
||||||
|
|
||||||
find_package (PkgConfig QUIET)
|
find_package (PkgConfig QUIET)
|
||||||
pkg_check_modules(PC_VORBIS QUIET vorbis)
|
pkg_check_modules (PC_VORBIS QUIET vorbis)
|
||||||
pkg_check_modules(PC_VORBISFILE QUIET vorbisfile)
|
|
||||||
pkg_check_modules(PC_VORBISENC QUIET vorbisenc)
|
|
||||||
|
|
||||||
find_path(VORBIS_INCLUDE_DIR vorbis/codec.h vorbis/vorbisfile.h vorbis/vorbisfile.h
|
set (VORBIS_VERSION ${PC_VORBIS_VERSION})
|
||||||
HINTS ${PC_VORBIS_INCLUDEDIR} ${PC_VORBIS_INCLUDE_DIRS} ${VORBIS_ROOT}
|
|
||||||
PATH_SUFFIXES include)
|
find_path (VORBIS_INCLUDE_DIR vorbis/codec.h
|
||||||
# MSVC built vorbis may be named vorbis_static
|
HINTS
|
||||||
# The provided project files name the library with the lib prefix.
|
${PC_VORBIS_INCLUDEDIR}
|
||||||
find_library(VORBIS_LIBRARY
|
${PC_VORBIS_INCLUDE_DIRS}
|
||||||
NAMES vorbis vorbis_static libvorbis libvorbis_static
|
${VORBIS_ROOT}
|
||||||
HINTS ${PC_VORBIS_LIBDIR} ${PC_VORBIS_LIBRARY_DIRS} ${VORBIS_ROOT}
|
)
|
||||||
PATH_SUFFIXES lib)
|
|
||||||
find_library(VORBISFILE_LIBRARY
|
find_library (VORBIS_LIBRARY
|
||||||
NAMES vorbisfile vorbisfile_static libvorbisfile libvorbisfile_static
|
NAMES
|
||||||
HINTS ${PC_VORBISFILE_LIBDIR} ${PC_VORBISFILE_LIBRARY_DIRS} ${VORBIS_ROOT}
|
vorbis
|
||||||
PATH_SUFFIXES lib)
|
vorbis_static
|
||||||
find_library(VORBISENC_LIBRARY
|
libvorbis
|
||||||
NAMES vorbisenc vorbisenc_static libvorbisenc libvorbisenc_static
|
libvorbis_static
|
||||||
HINTS ${PC_VORBISENC_LIBDIR} ${PC_VORBISENC_LIBRARY_DIRS} ${VORBIS_ROOT}
|
HINTS
|
||||||
PATH_SUFFIXES lib)
|
${PC_VORBIS_LIBDIR}
|
||||||
|
${PC_VORBIS_LIBRARY_DIRS}
|
||||||
|
${VORBIS_ROOT}
|
||||||
|
)
|
||||||
|
|
||||||
# Handle the QUIETLY and REQUIRED arguments and set VORBIS_FOUND
|
# Handle the QUIETLY and REQUIRED arguments and set VORBIS_FOUND
|
||||||
# to TRUE if all listed variables are TRUE.
|
# to TRUE if all listed variables are TRUE.
|
||||||
include(FindPackageHandleStandardArgs)
|
include (FindPackageHandleStandardArgs)
|
||||||
find_package_handle_standard_args(Vorbis DEFAULT_MSG VORBIS_INCLUDE_DIR VORBIS_LIBRARY VORBISFILE_LIBRARY VORBISENC_LIBRARY)
|
find_package_handle_standard_args (Vorbis
|
||||||
|
REQUIRED_VARS
|
||||||
|
VORBIS_LIBRARY
|
||||||
|
VORBIS_INCLUDE_DIR
|
||||||
|
OGG_FOUND
|
||||||
|
VERSION_VAR
|
||||||
|
VORBIS_VERSION
|
||||||
|
)
|
||||||
|
|
||||||
if (VORBIS_FOUND)
|
if (VORBIS_FOUND)
|
||||||
set (VORBIS_INCLUDE_DIRS ${VORBIS_INCLUDE_DIR} ${OGG_INCLUDE_DIRS})
|
set (VORBIS_INCLUDE_DIRS ${VORBIS_INCLUDE_DIR})
|
||||||
set (VORBIS_LIBRARIES ${VORBISFILE_LIBRARY} ${VORBIS_LIBRARY} ${VORBISENC_LIBRARY}
|
set (VORBIS_LIBRARIES ${VORBIS_LIBRARY} ${OGG_LIBRARIES})
|
||||||
${OGG_LIBRARIES})
|
if (NOT TARGET Vorbis::Vorbis)
|
||||||
endif (VORBIS_FOUND)
|
add_library (Vorbis::Vorbis UNKNOWN IMPORTED)
|
||||||
|
set_target_properties (Vorbis::Vorbis PROPERTIES
|
||||||
|
INTERFACE_INCLUDE_DIRECTORIES "${VORBIS_INCLUDE_DIR}"
|
||||||
|
IMPORTED_LOCATION "${VORBIS_LIBRARY}"
|
||||||
|
INTERFACE_LINK_LIBRARIES Ogg::Ogg
|
||||||
|
)
|
||||||
|
endif ()
|
||||||
|
endif ()
|
||||||
|
|
||||||
mark_as_advanced(VORBIS_INCLUDE_DIR VORBIS_LIBRARY VORBISFILE_LIBRARY VORBISENC_LIBRARY)
|
mark_as_advanced (VORBIS_INCLUDE_DIR VORBIS_LIBRARY)
|
||||||
|
64
cmake/FindVorbisEnc.cmake
Normal file
64
cmake/FindVorbisEnc.cmake
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
# - Find vorbisenc
|
||||||
|
# Find the native vorbisenc includes and libraries
|
||||||
|
#
|
||||||
|
# VORBISENC_INCLUDE_DIRS - where to find vorbisenc.h, etc.
|
||||||
|
# VORBISENC_LIBRARIES - List of libraries when using vorbisenc.
|
||||||
|
# VORBISENC_FOUND - True if vorbisenc found.
|
||||||
|
|
||||||
|
if (VORBISENC_INCLUDE_DIR)
|
||||||
|
# Already in cache, be silent
|
||||||
|
set (VORBISENC_FIND_QUIETLY TRUE)
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
find_package (Vorbis QUIET)
|
||||||
|
|
||||||
|
find_package (PkgConfig QUIET)
|
||||||
|
pkg_check_modules (PC_VORBISENC QUIET vorbisenc)
|
||||||
|
|
||||||
|
set (VORBISENC_VERSION ${PC_VORBISENC_VERSION})
|
||||||
|
|
||||||
|
find_path (VORBISENC_INCLUDE_DIR vorbis/vorbisenc.h
|
||||||
|
HINTS
|
||||||
|
${PC_VORBISENC_INCLUDEDIR}
|
||||||
|
${PC_VORBISENC_INCLUDE_DIRS}
|
||||||
|
${VORBISENC_ROOT}
|
||||||
|
)
|
||||||
|
|
||||||
|
find_library (VORBISENC_LIBRARY
|
||||||
|
NAMES
|
||||||
|
vorbisenc
|
||||||
|
vorbisenc_static
|
||||||
|
libvorbisenc
|
||||||
|
libvorbisenc_static
|
||||||
|
HINTS
|
||||||
|
${PC_VORBISENC_LIBDIR}
|
||||||
|
${PC_VORBISENC_LIBRARY_DIRS}
|
||||||
|
${VORBISENC_ROOT}
|
||||||
|
)
|
||||||
|
|
||||||
|
# Handle the QUIETLY and REQUIRED arguments and set VORBISENC_FOUND
|
||||||
|
# to TRUE if all listed variables are TRUE.
|
||||||
|
include (FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args (VorbisEnc
|
||||||
|
REQUIRED_VARS
|
||||||
|
VORBISENC_LIBRARY
|
||||||
|
VORBISENC_INCLUDE_DIR
|
||||||
|
VORBIS_FOUND
|
||||||
|
VERSION_VAR
|
||||||
|
VORBISENC_VERSION
|
||||||
|
)
|
||||||
|
|
||||||
|
if (VORBISENC_FOUND)
|
||||||
|
set (VORBISENC_INCLUDE_DIRS ${VORBISENC_INCLUDE_DIR})
|
||||||
|
set (VORBISENC_LIBRARIES ${VORBISENC_LIBRARY} ${VORBIS_LIBRARIES})
|
||||||
|
if (NOT TARGET Vorbis::VorbisEnc)
|
||||||
|
add_library (Vorbis::VorbisEnc UNKNOWN IMPORTED)
|
||||||
|
set_target_properties (Vorbis::VorbisEnc PROPERTIES
|
||||||
|
INTERFACE_INCLUDE_DIRECTORIES "${VORBISENC_INCLUDE_DIR}"
|
||||||
|
IMPORTED_LOCATION "${VORBISENC_LIBRARY}"
|
||||||
|
INTERFACE_LINK_LIBRARIES Vorbis::Vorbis
|
||||||
|
)
|
||||||
|
endif ()
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
mark_as_advanced (VORBISENC_INCLUDE_DIR VORBISENC_LIBRARY)
|
@ -1,3 +0,0 @@
|
|||||||
@PACKAGE_INIT@
|
|
||||||
|
|
||||||
include (${CMAKE_CURRENT_LIST_DIR}/LibSndFileTargets.cmake)
|
|
@ -9,7 +9,7 @@ include (TestInline)
|
|||||||
include (ClipMode)
|
include (ClipMode)
|
||||||
include(TestLargeFiles)
|
include(TestLargeFiles)
|
||||||
|
|
||||||
test_large_files(_LARGEFILES)
|
test_large_files (_LARGEFILES)
|
||||||
|
|
||||||
if (LARGE_FILES_DEFINITIONS)
|
if (LARGE_FILES_DEFINITIONS)
|
||||||
add_definitions(${LARGE_FILES_DEFINITIONS})
|
add_definitions(${LARGE_FILES_DEFINITIONS})
|
||||||
@ -17,75 +17,72 @@ endif ()
|
|||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
set(TYPEOF_SF_COUNT_T __int64)
|
set(TYPEOF_SF_COUNT_T __int64)
|
||||||
else (UNIX)
|
else ()
|
||||||
set(TYPEOF_SF_COUNT_T int64_t)
|
set(TYPEOF_SF_COUNT_T int64_t)
|
||||||
endif ()
|
endif ()
|
||||||
set(SF_COUNT_MAX 0x7fffffffffffffffll)
|
set (SF_COUNT_MAX 0x7fffffffffffffffll)
|
||||||
|
|
||||||
if (NOT WIN32)
|
if (NOT WIN32)
|
||||||
find_package (ALSA)
|
find_package (ALSA)
|
||||||
if (ALSA_FOUND)
|
find_package (Sndio)
|
||||||
set (HAVE_ALSA_ASOUNDLIB_H TRUE)
|
|
||||||
else ()
|
|
||||||
find_package (Sndio)
|
|
||||||
set (HAVE_SNDIO_H ${SNDIO_FOUND})
|
|
||||||
endif (ALSA_FOUND)
|
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if (NOT DISABLE_EXTERNAL_LIBS)
|
find_package (VorbisEnc)
|
||||||
find_package (Ogg)
|
|
||||||
find_package (Vorbis)
|
|
||||||
find_package (FLAC)
|
find_package (FLAC)
|
||||||
if (OGG_FOUND AND VORBIS_FOUND AND FLAC_FOUND)
|
if (VORBIS_FOUND AND FLAC_FOUND)
|
||||||
set (HAVE_EXTERNAL_XIPH_LIBS 1)
|
set (HAVE_EXTERNAL_XIPH_LIBS 1)
|
||||||
set (EXTERNAL_XIPH_LIBS
|
|
||||||
${OGG_LIBRARIES}
|
|
||||||
${VORBIS_LIBRARIES}
|
|
||||||
${FLAC_LIBRARIES})
|
|
||||||
else ()
|
else ()
|
||||||
set (DISABLE_EXTERNAL_LIBS ON)
|
set (HAVE_EXTERNAL_XIPH_LIBS 0)
|
||||||
endif ()
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
if (ENABLE_EXPERIMENTAL)
|
|
||||||
find_package (Speex)
|
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
find_package (Speex)
|
||||||
find_package (SQLite3)
|
find_package (SQLite3)
|
||||||
if (SQLITE3_FOUND)
|
|
||||||
set (HAVE_SQLITE3 1)
|
check_include_file (byteswap.h HAVE_BYTESWAP_H)
|
||||||
|
check_include_file (dlfcn.h HAVE_DLFCN_H)
|
||||||
|
check_include_file (direct.h HAVE_DIRECT_H)
|
||||||
|
check_include_file (endian.h HAVE_ENDIAN_H)
|
||||||
|
check_include_file (inttypes.h HAVE_INTTYPES_H)
|
||||||
|
check_include_file (io.h HAVE_IO_H)
|
||||||
|
check_include_file (stdint.h HAVE_STDINT_H)
|
||||||
|
check_include_file (sys/time.h HAVE_SYS_TIME_H)
|
||||||
|
check_include_file (sys/types.h HAVE_SYS_TYPES_H)
|
||||||
|
check_include_file (unistd.h HAVE_UNISTD_H)
|
||||||
|
|
||||||
|
# Never checked
|
||||||
|
# check_include_file (stdlib.h HAVE_STDLIB_H)
|
||||||
|
# check_include_file (string.h HAVE_STRING_H)
|
||||||
|
# check_include_file (strings.h HAVE_STRINGS_H)
|
||||||
|
# check_include_file (sys/stat.h HAVE_SYS_STAT_H)
|
||||||
|
# check_include_file (memory.h HAVE_MEMORY_H)
|
||||||
|
|
||||||
|
if (BUILD_TESTING)
|
||||||
|
check_include_file (locale.h HAVE_LOCALE_H)
|
||||||
|
check_include_file (sys/wait.h HAVE_SYS_WAIT_H)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
check_include_file(byteswap.h HAVE_BYTESWAP_H)
|
check_type_size (int64_t SIZEOF_INT64_T)
|
||||||
check_include_file(dlfcn.h HAVE_DLFCN_H)
|
check_type_size (long SIZEOF_LONG)
|
||||||
check_include_file(direct.h HAVE_DIRECT_H)
|
check_type_size (long\ long SIZEOF_LONG_LONG)
|
||||||
check_include_file(endian.h HAVE_ENDIAN_H)
|
check_type_size (ssize_t SIZEOF_SSIZE_T)
|
||||||
check_include_file(inttypes.h HAVE_INTTYPES_H)
|
check_type_size (wchar_t SIZEOF_WCHAR_T)
|
||||||
check_include_file(locale.h HAVE_LOCALE_H)
|
|
||||||
check_include_file(memory.h HAVE_MEMORY_H)
|
# Never used
|
||||||
check_include_file(stdint.h HAVE_STDINT_H)
|
# check_type_size (loff_t SIZEOF_LOFF_T)
|
||||||
check_include_file(stdlib.h HAVE_STDLIB_H)
|
# check_type_size (offt64_t SIZEOF_OFF64_T)
|
||||||
check_include_file(string.h HAVE_STRING_H)
|
|
||||||
check_include_file(strings.h HAVE_STRINGS_H)
|
# Never checked
|
||||||
check_include_file(sys/stat.h HAVE_SYS_STAT_H)
|
# check_type_size (size_t SIZEOF_SIZE_T)
|
||||||
check_include_file(sys/time.h HAVE_SYS_TIME_H)
|
|
||||||
check_include_file(sys/types.h HAVE_SYS_TYPES_H)
|
# Used in configre.ac
|
||||||
check_include_file(sys/wait.h HAVE_SYS_WAIT_H)
|
# check_type_size (double SIZEOF_DOUBLE)
|
||||||
check_include_file(unistd.h HAVE_UNISTD_H)
|
# check_type_size (float SIZEOF_FLOAT)
|
||||||
check_include_file(io.h HAVE_IO_H)
|
# check_type_size (int SIZEOF_INT)
|
||||||
check_type_size(int64_t SIZEOF_INT64_T)
|
# check_type_size (short SIZEOF_SHORT)
|
||||||
check_type_size(double SIZEOF_DOUBLE)
|
|
||||||
check_type_size(float SIZEOF_FLOAT)
|
if (ENABLE_TESTING)
|
||||||
check_type_size(int SIZEOF_INT)
|
check_type_size (void* SIZEOF_VOIDP)
|
||||||
check_type_size(loff_t SIZEOF_LOFF_T)
|
endif()
|
||||||
check_type_size(long SIZEOF_LONG)
|
|
||||||
check_type_size(long\ long SIZEOF_LONG_LONG)
|
|
||||||
check_type_size(offt64_t SIZEOF_OFF64_T)
|
|
||||||
check_type_size(short SIZEOF_SHORT)
|
|
||||||
check_type_size(size_t SIZEOF_SIZE_T)
|
|
||||||
check_type_size(ssize_t SIZEOF_SSIZE_T)
|
|
||||||
check_type_size(void* SIZEOF_VOIDP)
|
|
||||||
check_type_size(wchar_t SIZEOF_WCHAR_T)
|
|
||||||
|
|
||||||
if ((SIZEOF_OFF_T EQUAL 8) OR (SIZEOF_LOFF_T EQUAL 8) OR (SIZEOF_OFF64_T EQUAL 8))
|
if ((SIZEOF_OFF_T EQUAL 8) OR (SIZEOF_LOFF_T EQUAL 8) OR (SIZEOF_OFF64_T EQUAL 8))
|
||||||
set (TYPEOF_SF_COUNT_T "int64_t")
|
set (TYPEOF_SF_COUNT_T "int64_t")
|
||||||
@ -96,7 +93,7 @@ else ()
|
|||||||
set (TYPEOF_SF_COUNT_T "__int64")
|
set (TYPEOF_SF_COUNT_T "__int64")
|
||||||
set (SF_COUNT_MAX "0x7FFFFFFFFFFFFFFFLL")
|
set (SF_COUNT_MAX "0x7FFFFFFFFFFFFFFFLL")
|
||||||
set (SIZEOF_SF_COUNT_T 8)
|
set (SIZEOF_SF_COUNT_T 8)
|
||||||
else (NOT WIN32)
|
else ()
|
||||||
message ("")
|
message ("")
|
||||||
message ("*** The configure process has determined that this system is capable")
|
message ("*** The configure process has determined that this system is capable")
|
||||||
message ("*** of Large File Support but has not been able to find a type which")
|
message ("*** of Large File Support but has not been able to find a type which")
|
||||||
@ -104,64 +101,69 @@ else ()
|
|||||||
message ("*** Please contact the author to help resolve this problem.")
|
message ("*** Please contact the author to help resolve this problem.")
|
||||||
message ("")
|
message ("")
|
||||||
message (FATAL_ERROR "Bad file offset type.")
|
message (FATAL_ERROR "Bad file offset type.")
|
||||||
endif (WIN32)
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
check_type_size(${TYPEOF_SF_COUNT_T} SIZEOF_SF_COUNT_T)
|
|
||||||
|
|
||||||
find_library (M_LIBRARY m)
|
|
||||||
if (M_LIBRARY)
|
|
||||||
# Check if he need to link 'm' for math functions
|
|
||||||
check_library_exists (m floor "" LIBM_REQUIRED)
|
|
||||||
if (LIBM_REQUIRED)
|
|
||||||
list (APPEND CMAKE_REQUIRED_LIBRARIES ${M_LIBRARY})
|
|
||||||
else ()
|
|
||||||
unset (M_LIBRARY)
|
|
||||||
endif ()
|
endif ()
|
||||||
endif ()
|
endif ()
|
||||||
mark_as_advanced (M_LIBRARY)
|
|
||||||
|
check_type_size (${TYPEOF_SF_COUNT_T} SIZEOF_SF_COUNT_T)
|
||||||
|
|
||||||
|
if (NOT WIN32)
|
||||||
|
check_library_exists (m floor "" LIBM_REQUIRED)
|
||||||
|
if (LIBM_REQUIRED)
|
||||||
|
list (APPEND CMAKE_REQUIRED_LIBRARIES m)
|
||||||
|
endif ()
|
||||||
|
endif ()
|
||||||
|
|
||||||
check_library_exists (sqlite3 sqlite3_close "" HAVE_SQLITE3)
|
check_library_exists (sqlite3 sqlite3_close "" HAVE_SQLITE3)
|
||||||
|
|
||||||
check_function_exists(calloc HAVE_CALLOC)
|
check_function_exists (fstat HAVE_FSTAT)
|
||||||
check_function_exists(free HAVE_FREE)
|
check_function_exists (fstat64 HAVE_FSTAT64)
|
||||||
check_function_exists(fstat HAVE_FSTAT)
|
check_function_exists (gettimeofday HAVE_GETTIMEOFDAY)
|
||||||
check_function_exists(fstat64 HAVE_FSTAT64)
|
check_function_exists (gmtime HAVE_GMTIME)
|
||||||
check_function_exists(fsync HAVE_FSYNC)
|
check_function_exists (gmtime_r HAVE_GMTIME_R)
|
||||||
check_function_exists(ftruncate HAVE_FTRUNCATE)
|
check_function_exists (localtime HAVE_LOCALTIME)
|
||||||
check_function_exists(getpagesize HAVE_GETPAGESIZE)
|
check_function_exists (localtime_r HAVE_LOCALTIME_R)
|
||||||
check_function_exists(gettimeofday HAVE_GETTIMEOFDAY)
|
check_function_exists (lseek HAVE_LSEEK)
|
||||||
check_function_exists(gmtime HAVE_GMTIME)
|
check_function_exists (open HAVE_OPEN)
|
||||||
check_function_exists(gmtime_r HAVE_GMTIME_R)
|
check_function_exists (read HAVE_READ)
|
||||||
check_function_exists(localtime HAVE_LOCALTIME)
|
check_function_exists (write HAVE_WRITE)
|
||||||
check_function_exists(localtime_r HAVE_LOCALTIME_R)
|
check_function_exists (lrint HAVE_LRINT)
|
||||||
check_function_exists(lseek HAVE_LSEEK)
|
check_function_exists (lrintf HAVE_LRINTF)
|
||||||
check_function_exists(lseek64 HAVE_LSEEK64)
|
|
||||||
check_function_exists(malloc HAVE_MALLOC)
|
if (NOT WIN32)
|
||||||
check_function_exists(mmap HAVE_MMAP)
|
check_function_exists (ftruncate HAVE_FTRUNCATE)
|
||||||
check_function_exists(open HAVE_OPEN)
|
check_function_exists (fsync HAVE_FSYNC)
|
||||||
check_function_exists(pipe HAVE_PIPE)
|
endif ()
|
||||||
check_function_exists(read HAVE_READ)
|
|
||||||
check_function_exists(realloc HAVE_REALLOC)
|
if (BUILD_TESTING)
|
||||||
check_function_exists(setlocale HAVE_SETLOCALE)
|
check_function_exists (pipe HAVE_PIPE)
|
||||||
check_function_exists(snprintf HAVE_SNPRINTF)
|
check_function_exists (setlocale HAVE_SETLOCALE)
|
||||||
check_function_exists(vsnprintf HAVE_VSNPRINTF)
|
check_function_exists (waitpid HAVE_WAITPID)
|
||||||
check_function_exists(waitpid HAVE_WAITPID)
|
endif ()
|
||||||
check_function_exists(write HAVE_WRITE)
|
|
||||||
check_function_exists(ceil HAVE_CEIL)
|
# Never checked
|
||||||
check_function_exists(floor HAVE_FLOOR)
|
# check_function_exists (calloc HAVE_CALLOC)
|
||||||
check_function_exists(fmod HAVE_FMOD)
|
# check_function_exists (free HAVE_FREE)
|
||||||
check_function_exists(lrint HAVE_LRINT)
|
# check_function_exists (getpagesize HAVE_GETPAGESIZE)
|
||||||
check_function_exists(lrintf HAVE_LRINTF)
|
# check_function_exists (malloc HAVE_MALLOC)
|
||||||
check_function_exists(lround HAVE_LROUND)
|
# check_function_exists (realloc HAVE_REALLOC)
|
||||||
|
# check_function_exists (snprintf HAVE_SNPRINTF)
|
||||||
|
# check_function_exists (vsnprintf HAVE_VSNPRINTF)
|
||||||
|
# check_function_exists (floor HAVE_FLOOR)
|
||||||
|
# check_function_exists (fmod HAVE_FMOD)
|
||||||
|
|
||||||
|
# Never used
|
||||||
|
# check_function_exists (mmap HAVE_MMAP)
|
||||||
|
# check_function_exists (ceil HAVE_CEIL)
|
||||||
|
# check_function_exists (lround HAVE_LROUND)
|
||||||
|
# check_function_exists (lseek64 HAVE_LSEEK64)
|
||||||
|
|
||||||
|
|
||||||
check_symbol_exists (S_IRGRP sys/stat.h HAVE_DECL_S_IRGRP)
|
check_symbol_exists (S_IRGRP sys/stat.h HAVE_DECL_S_IRGRP)
|
||||||
|
|
||||||
test_big_endian(WORDS_BIGENDIAN)
|
test_big_endian (WORDS_BIGENDIAN)
|
||||||
if (WORDS_BIGENDIAN)
|
if (WORDS_BIGENDIAN)
|
||||||
set (WORDS_BIGENDIAN 1)
|
|
||||||
set (CPU_IS_BIG_ENDIAN 1)
|
set (CPU_IS_BIG_ENDIAN 1)
|
||||||
else (${LITTLE_ENDIAN})
|
else ()
|
||||||
set (CPU_IS_LITTLE_ENDIAN 1)
|
set (CPU_IS_LITTLE_ENDIAN 1)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
@ -171,12 +173,12 @@ if (WIN32)
|
|||||||
if (BUILD_SHARED_LIBS)
|
if (BUILD_SHARED_LIBS)
|
||||||
set (WIN32_TARGET_DLL 1)
|
set (WIN32_TARGET_DLL 1)
|
||||||
endif ()
|
endif ()
|
||||||
if (MINGW)
|
if (MINGW)
|
||||||
set (__USE_MINGW_ANSI_STDIO 1)
|
set (__USE_MINGW_ANSI_STDIO 1)
|
||||||
endif (MINGW)
|
endif ()
|
||||||
endif (WIN32)
|
endif ()
|
||||||
|
|
||||||
if (${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD")
|
if (CMAKE_SYSTEM_NAME STREQUAL "OpenBSD")
|
||||||
set (OS_IS_OPENBSD 1)
|
set (OS_IS_OPENBSD 1)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
@ -185,18 +187,8 @@ if (CMAKE_COMPILER_IS_GNUCC OR (CMAKE_C_COMPILER_ID MATCHES "Clang"))
|
|||||||
set (COMPILER_IS_GCC 1)
|
set (COMPILER_IS_GCC 1)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if (COMPILER_IS_GCC)
|
|
||||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra")
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
if (ENABLE_EXPERIMENTAL)
|
|
||||||
set (ENABLE_EXPERIMENTAL_CODE 1)
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
test_inline ()
|
test_inline ()
|
||||||
if (NOT DISABLE_CPU_CLIP)
|
clip_mode ()
|
||||||
clip_mode ()
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
if (MSVC)
|
if (MSVC)
|
||||||
add_definitions (-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE)
|
add_definitions (-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE)
|
||||||
@ -204,15 +196,16 @@ endif (MSVC)
|
|||||||
|
|
||||||
if (ENABLE_STATIC_RUNTIME)
|
if (ENABLE_STATIC_RUNTIME)
|
||||||
if (MSVC)
|
if (MSVC)
|
||||||
foreach(flag_var
|
foreach (flag_var
|
||||||
CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE
|
CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE
|
||||||
CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO
|
CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO
|
||||||
CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE
|
CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE
|
||||||
CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO)
|
CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO
|
||||||
if(${flag_var} MATCHES "/MD")
|
)
|
||||||
string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}")
|
if (${flag_var} MATCHES "/MD")
|
||||||
endif(${flag_var} MATCHES "/MD")
|
string (REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}")
|
||||||
endforeach(flag_var)
|
endif ()
|
||||||
|
endforeach (flag_var)
|
||||||
endif (MSVC)
|
endif (MSVC)
|
||||||
if (MINGW)
|
if (MINGW)
|
||||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -static-libgcc")
|
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -static-libgcc")
|
||||||
@ -222,24 +215,25 @@ if (ENABLE_STATIC_RUNTIME)
|
|||||||
endif (MINGW)
|
endif (MINGW)
|
||||||
elseif (NOT ENABLE_STATIC_RUNTIME)
|
elseif (NOT ENABLE_STATIC_RUNTIME)
|
||||||
if (MSVC)
|
if (MSVC)
|
||||||
foreach(flag_var
|
foreach (flag_var
|
||||||
CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE
|
CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE
|
||||||
CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO
|
CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO
|
||||||
CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE
|
CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE
|
||||||
CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO)
|
CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO
|
||||||
if(${flag_var} MATCHES "/MT")
|
)
|
||||||
string(REGEX REPLACE "/MT" "/MD" ${flag_var} "${${flag_var}}")
|
if (${flag_var} MATCHES "/MT")
|
||||||
endif(${flag_var} MATCHES "/MT")
|
string (REGEX REPLACE "/MT" "/MD" ${flag_var} "${${flag_var}}")
|
||||||
endforeach(flag_var)
|
endif (${flag_var} MATCHES "/MT")
|
||||||
endif (MSVC)
|
endforeach (flag_var)
|
||||||
|
endif ()
|
||||||
if (MINGW)
|
if (MINGW)
|
||||||
set (CMAKE_C_FLAGS "")
|
set (CMAKE_C_FLAGS "")
|
||||||
set (CMAKE_CXX_FLAGS "")
|
set (CMAKE_CXX_FLAGS "")
|
||||||
set (CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
|
set (CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
|
||||||
set (CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "")
|
set (CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "")
|
||||||
endif (MINGW)
|
endif ()
|
||||||
endif (ENABLE_STATIC_RUNTIME)
|
endif ( )
|
||||||
|
|
||||||
if (BUILD_SHARED_LIBS)
|
if (BUILD_SHARED_LIBS)
|
||||||
find_package(PythonInterp REQUIRED)
|
find_package (PythonInterp REQUIRED)
|
||||||
endif()
|
endif()
|
||||||
|
@ -12,56 +12,23 @@ if (NOT DEFINED ${VARIABLE})
|
|||||||
message (STATUS "")
|
message (STATUS "")
|
||||||
message (STATUS "Checking large files support...")
|
message (STATUS "Checking large files support...")
|
||||||
|
|
||||||
message (STATUS "")
|
if (WIN32)
|
||||||
check_include_file(sys/types.h HAVE_SYS_TYPES_H)
|
set (${VARIABLE} 1 CACHE INTERNAL "Result of tests for large file support" FORCE)
|
||||||
check_include_file(stdint.h HAVE_STDINT_H)
|
message (STATUS "")
|
||||||
check_include_file(stddef.h HAVE_STDDEF_H)
|
message (STATUS "Result of checking large files support: supported with WinAPI")
|
||||||
message (STATUS "")
|
|
||||||
|
|
||||||
message (STATUS "Checking size of off_t without any definitions:")
|
|
||||||
check_type_size (off_t SIZEOF_OFF_T)
|
|
||||||
message (STATUS "Checking of off_t without any definitions: ${SIZEOF_OFF_T}")
|
|
||||||
if (SIZEOF_OFF_T EQUAL 8)
|
|
||||||
set (LARGE_FILES_DEFINITIONS "" CACHE INTERNAL "64-bit off_t required definitions")
|
|
||||||
set (FILE64 TRUE)
|
|
||||||
else ()
|
else ()
|
||||||
unset (HAVE_SIZEOF_OFF_T CACHE)
|
|
||||||
unset (SIZEOF_OFF_T CACHE)
|
|
||||||
unset (SIZEOF_OFF_T_CODE CACHE)
|
|
||||||
cmake_pop_check_state()
|
|
||||||
set (FILE64 FALSE)
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
if (NOT FILE64)
|
|
||||||
set (CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} /D_FILE_OFFSET_BITS=64)
|
|
||||||
message (STATUS "")
|
message (STATUS "")
|
||||||
message (STATUS "Checking size of off_t with _FILE_OFFSET_BITS=64:")
|
check_include_file(sys/types.h HAVE_SYS_TYPES_H)
|
||||||
check_type_size (off_t SIZEOF_OFF_T)
|
check_include_file(stdint.h HAVE_STDINT_H)
|
||||||
message (STATUS "Checking size of off_t with _FILE_OFFSET_BITS=64: ${SIZEOF_OFF_T}")
|
check_include_file(stddef.h HAVE_STDDEF_H)
|
||||||
if (SIZEOF_OFF_T EQUAL 8)
|
message (STATUS "")
|
||||||
set (_FILE_OFFSET_BITS 64 CACHE INTERNAL "")
|
|
||||||
set (_FILE_OFFSET_BITS_CODE "#define _FILE_OFFSET_BITS 64" CACHE INTERNAL "")
|
|
||||||
set (LARGE_FILES_DEFINITIONS ${LARGE_FILES_DEFINITIONS} "/D_FILE_OFFSET_BITS=64" CACHE INTERNAL "64-bit off_t required definitions")
|
|
||||||
set (FILE64 TRUE)
|
|
||||||
else ()
|
|
||||||
set (_FILE_OFFSET_BITS_CODE "" CACHE INTERNAL "")
|
|
||||||
unset (HAVE_SIZEOF_OFF_T CACHE)
|
|
||||||
unset (SIZEOF_OFF_T CACHE)
|
|
||||||
unset (SIZEOF_OFF_T_CODE CACHE)
|
|
||||||
cmake_pop_check_state()
|
|
||||||
set (FILE64 FALSE)
|
|
||||||
endif ()
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
if (NOT FILE64)
|
message (STATUS "Checking size of off_t without any definitions:")
|
||||||
set (CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} /D_LARGE_FILES)
|
|
||||||
message (STATUS "")
|
|
||||||
message (STATUS "Checking size of off_t with _LARGE_FILES:")
|
|
||||||
check_type_size (off_t SIZEOF_OFF_T)
|
check_type_size (off_t SIZEOF_OFF_T)
|
||||||
message (STATUS "Checking size of off_t with _LARGE_FILES: ${SIZEOF_OFF_T}")
|
message (STATUS "Checking of off_t without any definitions: ${SIZEOF_OFF_T}")
|
||||||
if (SIZEOF_OFF_T EQUAL 8)
|
if (SIZEOF_OFF_T EQUAL 8)
|
||||||
set (_LARGE_FILES 1 CACHE INTERNAL "")
|
set (LARGE_FILES_DEFINITIONS "" CACHE INTERNAL "64-bit off_t required definitions")
|
||||||
set (LARGE_FILES_DEFINITIONS ${LARGE_FILES_DEFINITIONS} "/D_LARGE_FILES" CACHE INTERNAL "64-bit off_t required definitions")
|
|
||||||
set (FILE64 TRUE)
|
set (FILE64 TRUE)
|
||||||
else ()
|
else ()
|
||||||
unset (HAVE_SIZEOF_OFF_T CACHE)
|
unset (HAVE_SIZEOF_OFF_T CACHE)
|
||||||
@ -70,46 +37,84 @@ if (NOT DEFINED ${VARIABLE})
|
|||||||
cmake_pop_check_state()
|
cmake_pop_check_state()
|
||||||
set (FILE64 FALSE)
|
set (FILE64 FALSE)
|
||||||
endif ()
|
endif ()
|
||||||
endif ()
|
|
||||||
|
|
||||||
if (NOT FILE64)
|
if (NOT FILE64)
|
||||||
set (CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} /D_LARGEFILE_SOURCE)
|
set (CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} /D_FILE_OFFSET_BITS=64)
|
||||||
unset (HAVE_SIZEOF_OFF_T CACHE)
|
message (STATUS "")
|
||||||
unset (SIZEOF_OFF_T CACHE)
|
message (STATUS "Checking size of off_t with _FILE_OFFSET_BITS=64:")
|
||||||
unset (SIZEOF_OFF_T_CODE CACHE)
|
check_type_size (off_t SIZEOF_OFF_T)
|
||||||
|
message (STATUS "Checking size of off_t with _FILE_OFFSET_BITS=64: ${SIZEOF_OFF_T}")
|
||||||
|
if (SIZEOF_OFF_T EQUAL 8)
|
||||||
|
set (_FILE_OFFSET_BITS 64 CACHE INTERNAL "")
|
||||||
|
set (_FILE_OFFSET_BITS_CODE "#define _FILE_OFFSET_BITS 64" CACHE INTERNAL "")
|
||||||
|
set (LARGE_FILES_DEFINITIONS ${LARGE_FILES_DEFINITIONS} "/D_FILE_OFFSET_BITS=64" CACHE INTERNAL "64-bit off_t required definitions")
|
||||||
|
set (FILE64 TRUE)
|
||||||
|
else ()
|
||||||
|
set (_FILE_OFFSET_BITS_CODE "" CACHE INTERNAL "")
|
||||||
|
unset (HAVE_SIZEOF_OFF_T CACHE)
|
||||||
|
unset (SIZEOF_OFF_T CACHE)
|
||||||
|
unset (SIZEOF_OFF_T_CODE CACHE)
|
||||||
|
cmake_pop_check_state()
|
||||||
|
set (FILE64 FALSE)
|
||||||
|
endif ()
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
if (NOT FILE64)
|
||||||
|
set (CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} /D_LARGE_FILES)
|
||||||
|
message (STATUS "")
|
||||||
|
message (STATUS "Checking size of off_t with _LARGE_FILES:")
|
||||||
|
check_type_size (off_t SIZEOF_OFF_T)
|
||||||
|
message (STATUS "Checking size of off_t with _LARGE_FILES: ${SIZEOF_OFF_T}")
|
||||||
|
if (SIZEOF_OFF_T EQUAL 8)
|
||||||
|
set (_LARGE_FILES 1 CACHE INTERNAL "")
|
||||||
|
set (LARGE_FILES_DEFINITIONS ${LARGE_FILES_DEFINITIONS} "/D_LARGE_FILES" CACHE INTERNAL "64-bit off_t required definitions")
|
||||||
|
set (FILE64 TRUE)
|
||||||
|
else ()
|
||||||
|
unset (HAVE_SIZEOF_OFF_T CACHE)
|
||||||
|
unset (SIZEOF_OFF_T CACHE)
|
||||||
|
unset (SIZEOF_OFF_T_CODE CACHE)
|
||||||
|
cmake_pop_check_state()
|
||||||
|
set (FILE64 FALSE)
|
||||||
|
endif ()
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
if (NOT FILE64)
|
||||||
|
set (CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} /D_LARGEFILE_SOURCE)
|
||||||
|
unset (HAVE_SIZEOF_OFF_T CACHE)
|
||||||
|
unset (SIZEOF_OFF_T CACHE)
|
||||||
|
unset (SIZEOF_OFF_T_CODE CACHE)
|
||||||
|
message (STATUS "")
|
||||||
|
message (STATUS "Checking size of off_t with _LARGEFILE_SOURCE:")
|
||||||
|
check_type_size (off_t SIZEOF_OFF_T)
|
||||||
|
message (STATUS "Checking size of off_t with _LARGEFILE_SOURCE: ${SIZEOF_OFF_T}")
|
||||||
|
if (SIZEOF_OFF_T EQUAL 8)
|
||||||
|
set (_LARGEFILE_SOURCE 1 CACHE INTERNAL "")
|
||||||
|
set (LARGE_FILES_DEFINITIONS ${LARGE_FILES_DEFINITIONS} "/D_LARGEFILE_SOURCE" CACHE INTERNAL "64-bit off_t required definitions")
|
||||||
|
set (FILE64 TRUE)
|
||||||
|
else ()
|
||||||
|
cmake_pop_check_state()
|
||||||
|
set (FILE64 FALSE)
|
||||||
|
endif ()
|
||||||
|
endif ()
|
||||||
|
|
||||||
message (STATUS "")
|
message (STATUS "")
|
||||||
message (STATUS "Checking size of off_t with _LARGEFILE_SOURCE:")
|
if (FILE64)
|
||||||
check_type_size (off_t SIZEOF_OFF_T)
|
set (${VARIABLE} 1 CACHE INTERNAL "Result of tests for large file support" FORCE)
|
||||||
message (STATUS "Checking size of off_t with _LARGEFILE_SOURCE: ${SIZEOF_OFF_T}")
|
if (NOT SIZEOF_OFF_T_REQURED_DEFINITIONS)
|
||||||
if (SIZEOF_OFF_T EQUAL 8)
|
message (STATUS "Result of checking large files support: supported")
|
||||||
set (_LARGEFILE_SOURCE 1 CACHE INTERNAL "")
|
else ()
|
||||||
set (LARGE_FILES_DEFINITIONS ${LARGE_FILES_DEFINITIONS} "/D_LARGEFILE_SOURCE" CACHE INTERNAL "64-bit off_t required definitions")
|
message (STATUS "Result of checking large files support: supported with ${LARGE_FILES_DEFINITIONS}")
|
||||||
set (FILE64 TRUE)
|
message (STATUS "Add LARGE_FILES_DEFINITIONS to your compiler definitions or configure with _FILE_OFFSET_BITS,")
|
||||||
|
message (STATUS "_FILE_OFFSET_BITS_CODE, _LARGE_FILES and _LARGEFILE_SOURCE variables.")
|
||||||
|
endif ()
|
||||||
else ()
|
else ()
|
||||||
cmake_pop_check_state()
|
message ("Result of checking large files support: not supported")
|
||||||
set (FILE64 FALSE)
|
set (${VARIABLE} 0 CACHE INTERNAL "Result of test for large file support" FORCE)
|
||||||
endif ()
|
endif ()
|
||||||
endif ()
|
message ("")
|
||||||
|
message ("")
|
||||||
|
|
||||||
message (STATUS "")
|
|
||||||
if (FILE64)
|
|
||||||
set (${VARIABLE} 1 CACHE INTERNAL "Result of tests for large file support" FORCE)
|
|
||||||
if (NOT SIZEOF_OFF_T_REQURED_DEFINITIONS)
|
|
||||||
message (STATUS "Result of checking large files support: supported")
|
|
||||||
else ()
|
|
||||||
message (STATUS "Result of checking large files support: supported with ${LARGE_FILES_DEFINITIONS}")
|
|
||||||
message (STATUS "Add LARGE_FILES_DEFINITIONS to your compiler definitions or configure with _FILE_OFFSET_BITS,")
|
|
||||||
message (STATUS "_FILE_OFFSET_BITS_CODE, _LARGE_FILES and _LARGEFILE_SOURCE variables.")
|
|
||||||
endif ()
|
|
||||||
elseif (WIN32)
|
|
||||||
set (${VARIABLE} 1 CACHE INTERNAL "Result of tests for large file support" FORCE)
|
|
||||||
message (STATUS "Result of checking large files support: supported with WinAPI")
|
|
||||||
else ()
|
|
||||||
message ("Result of checking large files support: not supported")
|
|
||||||
set (${VARIABLE} 0 CACHE INTERNAL "Result of test for large file support" FORCE)
|
|
||||||
endif ()
|
endif ()
|
||||||
message ("")
|
|
||||||
message ("")
|
|
||||||
|
|
||||||
endif (NOT DEFINED ${VARIABLE})
|
endif (NOT DEFINED ${VARIABLE})
|
||||||
|
|
||||||
|
@ -1,12 +0,0 @@
|
|||||||
prefix=@PC_PREFIX@
|
|
||||||
exec_prefix=@PC_EXEC_PREFIX@
|
|
||||||
libdir=@PC_LIBDIR@
|
|
||||||
includedir=@PC_INCLUDEDIR@
|
|
||||||
|
|
||||||
Name: sndfile
|
|
||||||
Description: A library for reading and writing audio files
|
|
||||||
Requires:
|
|
||||||
Version: @PC_VERSION@
|
|
||||||
Libs: -L${libdir} -lsndfile
|
|
||||||
Libs.private: @PC_PRIVATE_LIBS@
|
|
||||||
Cflags: -I${includedir}
|
|
@ -191,19 +191,19 @@
|
|||||||
#cmakedefine01 OS_IS_WIN32
|
#cmakedefine01 OS_IS_WIN32
|
||||||
|
|
||||||
/* Name of package */
|
/* Name of package */
|
||||||
#define PACKAGE "@CPACK_PACKAGE_NAME@"
|
#define PACKAGE "@PROJECT_NAME@"
|
||||||
|
|
||||||
/* Define to the address where bug reports for this package should be sent. */
|
/* Define to the address where bug reports for this package should be sent. */
|
||||||
#define PACKAGE_BUGREPORT "@PACKAGE_BUGREPORT@"
|
#define PACKAGE_BUGREPORT "@PACKAGE_BUGREPORT@"
|
||||||
|
|
||||||
/* Define to the full name of this package. */
|
/* Define to the full name of this package. */
|
||||||
#define PACKAGE_NAME "@CPACK_PACKAGE_NAME@"
|
#define PACKAGE_NAME "@PROJECT_NAME@"
|
||||||
|
|
||||||
/* Define to the full name and version of this package. */
|
/* Define to the full name and version of this package. */
|
||||||
#define PACKAGE_STRING "@CPACK_PACKAGE_NAME@ @CPACK_PACKAGE_VERSION_FULL@"
|
#define PACKAGE_STRING "@PROJECT_NAME@ @CPACK_PACKAGE_VERSION_FULL@"
|
||||||
|
|
||||||
/* Define to the one symbol short name of this package. */
|
/* Define to the one symbol short name of this package. */
|
||||||
#define PACKAGE_TARNAME "@CPACK_PACKAGE_NAME@"
|
#define PACKAGE_TARNAME "@PROJECT_NAME@"
|
||||||
|
|
||||||
/* Define to the home page for this package. */
|
/* Define to the home page for this package. */
|
||||||
#define PACKAGE_URL "@PACKAGE_URL@"
|
#define PACKAGE_URL "@PACKAGE_URL@"
|
||||||
|
@ -110,7 +110,6 @@ def darwin_symbols (progname, version):
|
|||||||
|
|
||||||
def win32_symbols (progname, version, name):
|
def win32_symbols (progname, version, name):
|
||||||
print ("; Auto-generated by %s\n" %progname)
|
print ("; Auto-generated by %s\n" %progname)
|
||||||
print ("LIBRARY %s-%s.dll" % (name, re.sub ("\..*", "", version)))
|
|
||||||
print ("EXPORTS\n")
|
print ("EXPORTS\n")
|
||||||
for name, ordinal in ALL_SYMBOLS:
|
for name, ordinal in ALL_SYMBOLS:
|
||||||
print ("%-20s @%s" % (name, ordinal))
|
print ("%-20s @%s" % (name, ordinal))
|
||||||
|
@ -19,7 +19,6 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_AUS
|
|||||||
VALUE "Full Version", "@PACKAGE_VERSION@"
|
VALUE "Full Version", "@PACKAGE_VERSION@"
|
||||||
VALUE "InternalName", "libsndfile"
|
VALUE "InternalName", "libsndfile"
|
||||||
VALUE "LegalCopyright", "Copyright (C) 1999-2012, Licensed LGPL"
|
VALUE "LegalCopyright", "Copyright (C) 1999-2012, Licensed LGPL"
|
||||||
VALUE "OriginalFilename", "libsndfile-1.dll"
|
|
||||||
VALUE "ProductName", "libsndfile-1 DLL"
|
VALUE "ProductName", "libsndfile-1 DLL"
|
||||||
VALUE "ProductVersion", "@CLEAN_VERSION@.0\0"
|
VALUE "ProductVersion", "@CLEAN_VERSION@.0\0"
|
||||||
VALUE "Language", "Language Neutral"
|
VALUE "Language", "Language Neutral"
|
||||||
|
Loading…
Reference in New Issue
Block a user