diff options
author | Aki <please@ignore.pl> | 2022-02-09 22:23:03 +0100 |
---|---|---|
committer | Aki <please@ignore.pl> | 2022-02-09 22:53:55 +0100 |
commit | 373dc625f82b47096893add42c4472e4a57ab7eb (patch) | |
tree | 640228d02476d379de13071b13d1b1fa322b767f /vorbis/CMakeLists.txt | |
parent | 2d7dd844219965b81e81848e60d7f7bf23035ee4 (diff) | |
download | starshatter-373dc625f82b47096893add42c4472e4a57ab7eb.zip starshatter-373dc625f82b47096893add42c4472e4a57ab7eb.tar.gz starshatter-373dc625f82b47096893add42c4472e4a57ab7eb.tar.bz2 |
Moved third-party libraries to a separate subdirectory
Diffstat (limited to 'vorbis/CMakeLists.txt')
-rw-r--r-- | vorbis/CMakeLists.txt | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/vorbis/CMakeLists.txt b/vorbis/CMakeLists.txt deleted file mode 100644 index 1eb36e5..0000000 --- a/vorbis/CMakeLists.txt +++ /dev/null @@ -1,59 +0,0 @@ -cmake_minimum_required(VERSION 2.8.7) -project(vorbis) - -# Required modules -include(GNUInstallDirs) -include(CheckIncludeFiles) - -# Build options -option(BUILD_SHARED_LIBS "Build shared library" OFF) -if(APPLE) - option(BUILD_FRAMEWORK "Build Framework bundle for OSX" OFF) -endif() - -if(BUILD_FRAMEWORK) - set(BUILD_SHARED_LIBS TRUE) -endif() - -# Extract project version from configure.ac -file(READ configure.ac CONFIGURE_AC_CONTENTS) -string(REGEX MATCH "AC_INIT\\(\\[libvorbis\\],\\[([0-9]*).([0-9]*).([0-9]*)" DUMMY ${CONFIGURE_AC_CONTENTS}) -set(PROJECT_VERSION_MAJOR ${CMAKE_MATCH_1}) -set(PROJECT_VERSION_MINOR ${CMAKE_MATCH_2}) -set(PROJECT_VERSION_PATCH ${CMAKE_MATCH_3}) -set(PROJECT_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}) - -# Helper function to get version-info -function(get_version_info result current_var_name age_var_name revision_var_name) - string(REGEX MATCH "${current_var_name}=([0-9]*)" DUMMY ${CONFIGURE_AC_CONTENTS}) - set(VERSION_INFO_CURRENT ${CMAKE_MATCH_1}) - - string(REGEX MATCH "${age_var_name}=([0-9]*)" DUMMY ${CONFIGURE_AC_CONTENTS}) - set(VERSION_INFO_AGE ${CMAKE_MATCH_1}) - - string(REGEX MATCH "${revision_var_name}=([0-9]*)" DUMMY ${CONFIGURE_AC_CONTENTS}) - set(VERSION_INFO_REVISION ${CMAKE_MATCH_1}) - - math(EXPR VERSION_INFO_CURRENT_MINUS_AGE "${VERSION_INFO_CURRENT} - ${VERSION_INFO_AGE}") - - set(${result} "${VERSION_INFO_CURRENT_MINUS_AGE}.${VERSION_INFO_AGE}.${VERSION_INFO_REVISION}" PARENT_SCOPE) -endfunction() - -# Helper function to configure pkg-config files -function(configure_pkg_config_file pkg_config_file_in) - set(prefix ${CMAKE_INSTALL_PREFIX}) - set(exec_prefix ${CMAKE_INSTALL_FULL_BINDIR}) - set(libdir ${CMAKE_INSTALL_FULL_LIBDIR}) - set(includedir ${CMAKE_INSTALL_FULL_INCLUDEDIR}) - set(VERSION ${PROJECT_VERSION}) - string(REPLACE ".in" "" pkg_config_file ${pkg_config_file_in}) - configure_file(${pkg_config_file_in} ${pkg_config_file} @ONLY) -endfunction() - -message(STATUS "Configuring ${PROJECT_NAME} ${PROJECT_VERSION}") - -add_subdirectory(lib) - -configure_pkg_config_file(vorbis.pc.in) -configure_pkg_config_file(vorbisenc.pc.in) -configure_pkg_config_file(vorbisfile.pc.in) |