diff options
| author | Marin Ivanov <[email protected]> | 2025-07-25 10:17:14 +0300 |
|---|---|---|
| committer | Marin Ivanov <[email protected]> | 2026-01-18 20:09:26 +0200 |
| commit | 0168586485e6310c598713c911b1dec5618d61a1 (patch) | |
| tree | 6aabc2a12ef8fef70683f5389bea00f948015f77 /cmake | |
* codec2 cut-down version 1.2.0
* Remove codebook and generation of sources
* remove c2dec c2enc binaries
* prepare for emscripten
Diffstat (limited to 'cmake')
| -rw-r--r-- | cmake/GetDependencies.cmake.in | 24 | ||||
| -rw-r--r-- | cmake/config.h.in | 23 | ||||
| -rw-r--r-- | cmake/version.h.in | 37 |
3 files changed, 84 insertions, 0 deletions
diff --git a/cmake/GetDependencies.cmake.in b/cmake/GetDependencies.cmake.in new file mode 100644 index 0000000..0d25f67 --- /dev/null +++ b/cmake/GetDependencies.cmake.in @@ -0,0 +1,24 @@ +# As this script is run in a new cmake instance, it does not have access to +# the existing cache variables. Pass them in via the configure_file command. +set(CMAKE_BINARY_DIR @CMAKE_BINARY_DIR@) +set(CMAKE_SOURCE_DIR @CMAKE_SOURCE_DIR@) +set(UNIX @UNIX@) +set(WIN32 @WIN32@) +set(CMAKE_CROSSCOMPILING @CMAKE_CROSSCOMPILING@) +set(CMAKE_FIND_LIBRARY_SUFFIXES @CMAKE_FIND_LIBRARY_SUFFIXES@) +set(CMAKE_FIND_LIBRARY_PREFIXES @CMAKE_FIND_LIBRARY_PREFIXES@) +set(CMAKE_SYSTEM_LIBRARY_PATH @CMAKE_SYSTEM_LIBRARY_PATH@) +set(CMAKE_FIND_ROOT_PATH @CMAKE_FIND_ROOT_PATH@) +set(CODEC2_DLL ${CMAKE_BINARY_DIR}/src/libcodec2.dll) + +include(${CMAKE_SOURCE_DIR}/cmake/GetPrerequisites.cmake) +get_prerequisites(${CODEC2_DLL} _deps 1 0 "" "") +foreach(_runtime ${_deps}) + message("Looking for ${_runtime}") + find_library(RUNTIME_${_runtime} ${_runtime}) + message("${RUNTIME_${_runtime}}") + if(RUNTIME_${_runtime}) + file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/bin" + TYPE EXECUTABLE FILES "${RUNTIME_${_runtime}}") + endif() +endforeach() diff --git a/cmake/config.h.in b/cmake/config.h.in new file mode 100644 index 0000000..60ee7d6 --- /dev/null +++ b/cmake/config.h.in @@ -0,0 +1,23 @@ +/*-------------------------------------------------------------------------- + ** This file is autogenerated from config.h.in + ** during the cmake configuration of your project. If you need to make changes + ** edit the original file NOT THIS FILE. + ** --------------------------------------------------------------------------*/ +#ifndef _CONFIGURATION_HEADER_GUARD_H_ +#define _CONFIGURATION_HEADER_GUARD_H_ + +#define SIZEOF_INT @SIZEOF_INT@ +#cmakedefine HAVE_STDLIB_H @HAVE_STDLIB_H@ +#cmakedefine HAVE_STRING_H @HAVE_STRING_H@ +#cmakedefine HAVE_FLOOR @HAVE_FLOOR@ +#cmakedefine HAVE_CEIL @HAVE_CEIL@ +#cmakedefine HAVE_MEMSET @HAVE_MEMSET@ +#cmakedefine HAVE_POW @HAVE_POW@ +#cmakedefine HAVE_SQRT @HAVE_SQRT@ +#cmakedefine HAVE_SIN @HAVE_SIN@ +#cmakedefine HAVE_COS @HAVE_COS@ +#cmakedefine HAVE_ATAN2 @HAVE_ATAN2@ +#cmakedefine HAVE_LOG10 @HAVE_LOG10@ +#cmakedefine HAVE_ROUND @HAVE_ROUND@ +#cmakedefine HAVE_GETOPT @HAVE_GETOPT@ +#endif diff --git a/cmake/version.h.in b/cmake/version.h.in new file mode 100644 index 0000000..45b26aa --- /dev/null +++ b/cmake/version.h.in @@ -0,0 +1,37 @@ +/*---------------------------------------------------------------------------*\ + + FILE........: version.h + AUTHOR......: Tomas Härdin + DATE CREATED: 03 November 2017 + + Codec 2 VERSION #defines + +\*---------------------------------------------------------------------------*/ + +/* + Copyright (C) 2017 Tomas Härdin + + All rights reserved. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License version 2.1, as + published by the Free Software Foundation. This program is + distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public + License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program; if not, see <http://www.gnu.org/licenses/>. +*/ + +//this functions both as an include guard and your typical HAVE macro +#ifndef CODEC2_HAVE_VERSION +#define CODEC2_HAVE_VERSION + +#define CODEC2_VERSION_MAJOR @CODEC2_VERSION_MAJOR@ +#define CODEC2_VERSION_MINOR @CODEC2_VERSION_MINOR@ +#cmakedefine CODEC2_VERSION_PATCH @CODEC2_VERSION_PATCH@ +#define CODEC2_VERSION "@CODEC2_VERSION@" + +#endif //CODEC2_HAVE_VERSION
\ No newline at end of file |
