mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-12 15:14:35 +00:00
VCPKG Full refactor
uses local cache for assets now so should be able to produce an offline build with vcpkg. Only a couple of libraries left that are too big, and the vcpkg repo itself has files that are blocked from the repo. We could get around both issues by utilizing a submodule
This commit is contained in:
parent
0b73e701ac
commit
392df11e2b
9683 changed files with 284 additions and 3462845 deletions
|
|
@ -1,14 +1,23 @@
|
|||
# Ensure zlib has been added before using this module
|
||||
if(TARGET zlib)
|
||||
if(TARGET ZLIB::ZLIB)
|
||||
# Already resolved by an earlier find_package(ZLIB) call this configure —
|
||||
# just reuse it, no extra work needed.
|
||||
set(ZLIB_FOUND TRUE)
|
||||
set(ZLIB_INCLUDE_DIRS $<TARGET_PROPERTY:zlib,INTERFACE_INCLUDE_DIRECTORIES>)
|
||||
set(ZLIB_LIBRARIES zlib)
|
||||
message(STATUS "Using Torques build of zlib.")
|
||||
# Provide an alias for consistency with modern CMake
|
||||
if(NOT TARGET ZLIB::ZLIB)
|
||||
add_library(ZLIB::ZLIB ALIAS zlib)
|
||||
endif()
|
||||
get_target_property(ZLIB_INCLUDE_DIRS ZLIB::ZLIB INTERFACE_INCLUDE_DIRECTORIES)
|
||||
set(ZLIB_LIBRARIES ZLIB::ZLIB)
|
||||
else()
|
||||
set(ZLIB_FOUND FALSE)
|
||||
message(FATAL_ERROR "Zlib was not added with add_subdirectory before calling find_package(ZLIB).")
|
||||
# Not resolved yet
|
||||
set(_torque_saved_module_path "${CMAKE_MODULE_PATH}")
|
||||
list(REMOVE_ITEM CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/Tools/CMake/finders")
|
||||
|
||||
find_package(ZLIB MODULE REQUIRED)
|
||||
|
||||
set(CMAKE_MODULE_PATH "${_torque_saved_module_path}")
|
||||
unset(_torque_saved_module_path)
|
||||
|
||||
message(STATUS "Resolved zlib via vcpkg for: ${CMAKE_FIND_PACKAGE_NAME}")
|
||||
endif()
|
||||
|
||||
if(NOT ZLIB_FOUND)
|
||||
message(FATAL_ERROR "Could not resolve zlib (expected it via vcpkg's ZLIB::ZLIB target).")
|
||||
endif()
|
||||
|
|
@ -3,19 +3,8 @@ option(TORQUE_PHYSICS_BULLET "Use Bullet physics" OFF)
|
|||
|
||||
if(TORQUE_PHYSICS_BULLET)
|
||||
message("Enabling Bullet Module")
|
||||
|
||||
set(TORQUE_LINK_LIBRARIES ${TORQUE_LINK_LIBRARIES} BulletSoftBody Bullet3Dynamics BulletInverseDynamics BulletCollision
|
||||
Bullet2FileLoader BulletDynamics Bullet3OpenCL_clew Bullet3Common
|
||||
LinearMath Bullet3Geometry Bullet3Collision)
|
||||
find_package(Bullet CONFIG REQUIRED)
|
||||
set(TORQUE_LINK_THIRDPARTY ${TORQUE_LINK_THIRDPARTY} BulletDynamics BulletCollision LinearMath Bullet3Common)
|
||||
set(TORQUE_COMPILE_DEFINITIONS ${TORQUE_COMPILE_DEFINITIONS} TORQUE_PHYSICS_BULLET TORQUE_PHYSICS_ENABLED)
|
||||
set(TORQUE_INCLUDE_DIRECTORIES ${TORQUE_INCLUDE_DIRECTORIES} "${TORQUE_LIB_ROOT_DIRECTORY}/bullet/src" )
|
||||
|
||||
# Since Bullet lives elsewhere we need to ensure it is known to Torque when providing a link to it
|
||||
set(BUILD_SHARED_LIBS OFF CACHE BOOL "Bullet Shared Libs" FORCE)
|
||||
set(BUILD_CPU_DEMOS OFF CACHE BOOL "Bullet CPU Demos" FORCE)
|
||||
set(BUILD_BULLET2_DEMOS OFF CACHE BOOL "Bullet2 Demos" FORCE)
|
||||
set(BUILD_EXTRAS OFF CACHE BOOL "Set when you want to build the extras" FORCE)
|
||||
set(USE_GRAPHICAL_BENCHMARK OFF CACHE BOOL "Use Graphical Benchmark" FORCE)
|
||||
set(USE_GLUT OFF CACHE BOOL "Use Glut" FORCE)
|
||||
add_subdirectory("${TORQUE_LIB_ROOT_DIRECTORY}/bullet" ${TORQUE_LIB_TARG_DIRECTORY}/bullet EXCLUDE_FROM_ALL)
|
||||
# No more add_subdirectory — vcpkg's bullet3 port provides the targets above.
|
||||
endif(TORQUE_PHYSICS_BULLET)
|
||||
|
|
|
|||
|
|
@ -3,16 +3,13 @@ option(TORQUE_NAVIGATION "Enable Navigation module" ON)
|
|||
|
||||
if(TORQUE_NAVIGATION)
|
||||
message("Enabling Navigation Module")
|
||||
|
||||
file(GLOB TORQUE_NAV_SOURCES "${CMAKE_SOURCE_DIR}/Engine/source/navigation/*.cpp" "${CMAKE_SOURCE_DIR}/Engine/source/navigation/*.h")
|
||||
if(TORQUE_TOOLS)
|
||||
file(GLOB_RECURSE TORQUE_NAV_TOOLS "${CMAKE_SOURCE_DIR}/Engine/source/navigation/navMeshTools/*.cpp" "${CMAKE_SOURCE_DIR}/Engine/source/navigation/navMeshTools/*.h")
|
||||
endif()
|
||||
set(TORQUE_SOURCE_FILES ${TORQUE_SOURCE_FILES} ${TORQUE_NAV_SOURCES} ${TORQUE_NAV_TOOLS})
|
||||
set(TORQUE_LINK_LIBRARIES ${TORQUE_LINK_LIBRARIES} recast)
|
||||
find_package(recastnavigation CONFIG REQUIRED)
|
||||
set(TORQUE_LINK_THIRDPARTY ${TORQUE_LINK_THIRDPARTY} RecastNavigation::Detour RecastNavigation::Recast RecastNavigation::DebugUtils RecastNavigation::DetourCrowd)
|
||||
set(TORQUE_COMPILE_DEFINITIONS ${TORQUE_COMPILE_DEFINITIONS} recast TORQUE_NAVIGATION_ENABLED)
|
||||
|
||||
# Since recast lives elsewhere we need to ensure it is known to Torque when providing a link to it
|
||||
add_subdirectory("${TORQUE_LIB_ROOT_DIRECTORY}/recast" ${TORQUE_LIB_TARG_DIRECTORY}/recast EXCLUDE_FROM_ALL)
|
||||
source_group(TREE "${CMAKE_SOURCE_DIR}/Engine/source/navigation/" PREFIX "Modules/NAVIGATION" FILES ${TORQUE_NAV_SOURCES} ${TORQUE_NAV_TOOLS})
|
||||
endif(TORQUE_NAVIGATION)
|
||||
|
|
|
|||
|
|
@ -3,28 +3,14 @@ option(TORQUE_SFX_OPENAL "Use OpenAL SFX" ON)
|
|||
|
||||
if(TORQUE_SFX_OPENAL)
|
||||
message("Enabling OpenAL Module")
|
||||
|
||||
torqueAddSourceDirectories("${CMAKE_SOURCE_DIR}/Engine/source/sfx/openal")
|
||||
|
||||
if (APPLE)
|
||||
torqueAddSourceDirectories("${CMAKE_SOURCE_DIR}/Engine/source/sfx/openal/mac")
|
||||
elseif (WIN32)
|
||||
torqueAddSourceDirectories("${CMAKE_SOURCE_DIR}/Engine/source/sfx/openal/win32")
|
||||
elseif (UNIX)
|
||||
torqueAddSourceDirectories("${CMAKE_SOURCE_DIR}/Engine/source/sfx/openal/linux")
|
||||
else()
|
||||
message(FATAL_ERROR "Unsupported OpenAL platform.")
|
||||
endif (APPLE)
|
||||
|
||||
set(TORQUE_LINK_LIBRARIES ${TORQUE_LINK_LIBRARIES} OpenAL)
|
||||
|
||||
# Since OpenAL lives elsewhere we need to ensure it is known to Torque when providing a link to it
|
||||
set(ALSOFT_EXAMPLES OFF CACHE BOOL "OpenAL Examples" FORCE)
|
||||
set(ALSOFT_UTILS OFF CACHE BOOL "OpenAL Utilities" FORCE)
|
||||
set(ALSOFT_UPDATE_BUILD_VERSION OFF CACHE BOOL "Update build Version" UPDATE)
|
||||
|
||||
add_subdirectory("${TORQUE_LIB_ROOT_DIRECTORY}/openal-soft" ${TORQUE_LIB_TARG_DIRECTORY}/openal-soft EXCLUDE_FROM_ALL)
|
||||
if(APPLE)
|
||||
target_compile_options(OpenAL PRIVATE -Wno-error=undef)
|
||||
endif()
|
||||
endif(TORQUE_SFX_OPENAL)
|
||||
find_package(OpenAL CONFIG REQUIRED)
|
||||
set(TORQUE_LINK_THIRDPARTY ${TORQUE_LINK_THIRDPARTY} OpenAL::OpenAL)
|
||||
endif(TORQUE_SFX_OPENAL)
|
||||
|
|
@ -1,92 +1,146 @@
|
|||
################# Initialize Common Variables ###################
|
||||
if(NOT DEFINED ENV{VCPKG_ROOT})
|
||||
set(VCPKG_ROOT "${CMAKE_BINARY_DIR}/vcpkg" CACHE PATH "VCPKG Root")
|
||||
if(NOT EXISTS "${VCPKG_ROOT}")
|
||||
message(STATUS "Bootstrapping vcpkg...")
|
||||
if (GIT_IN_USE)
|
||||
execute_process(
|
||||
COMMAND git clone https://github.com/microsoft/vcpkg.git "${VCPKG_ROOT}"
|
||||
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}")
|
||||
# Pin to a specific vcpkg release so installs are reproducible without
|
||||
# needing git to resolve a baseline. Bump this when you want newer ports.
|
||||
set(TORQUE_VCPKG_TAG "2025.06.13" CACHE STRING "vcpkg release tag to bootstrap")
|
||||
set(VCPKG_ROOT "${CMAKE_SOURCE_DIR}/Tools/CMake/vcpkg/local" CACHE PATH "VCPKG Root")
|
||||
|
||||
if(NOT EXISTS "${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake")
|
||||
message(STATUS "vcpkg not found at ${VCPKG_ROOT} — fetching ${TORQUE_VCPKG_TAG} now (one-time)...")
|
||||
|
||||
if(GIT_IN_USE)
|
||||
execute_process(
|
||||
COMMAND git clone --branch ${TORQUE_VCPKG_TAG} --depth 1
|
||||
https://github.com/microsoft/vcpkg.git "${VCPKG_ROOT}"
|
||||
RESULT_VARIABLE _TORQUE_VCPKG_FETCH_RESULT)
|
||||
else()
|
||||
set(VCPKG_ZIP_FILE "${CMAKE_BINARY_DIR}/vcpkg-${TORQUE_VCPKG_TAG}.zip")
|
||||
set(VCPKG_EXTRACT_DEST "${CMAKE_BINARY_DIR}/vcpkg-extracted-temp")
|
||||
|
||||
if(NOT EXISTS "${VCPKG_ZIP_FILE}")
|
||||
message(STATUS "Downloading vcpkg ${TORQUE_VCPKG_TAG} archive...")
|
||||
file(DOWNLOAD "https://github.com/microsoft/vcpkg/archive/refs/tags/${TORQUE_VCPKG_TAG}.zip"
|
||||
"${VCPKG_ZIP_FILE}" SHOW_PROGRESS
|
||||
STATUS _TORQUE_VCPKG_DOWNLOAD_STATUS)
|
||||
list(GET _TORQUE_VCPKG_DOWNLOAD_STATUS 0 _TORQUE_VCPKG_FETCH_RESULT)
|
||||
else()
|
||||
set(VCPKG_MANIFEST_MODE OFF CACHE BOOL "Disable vcpkg manifest mode" FORCE)
|
||||
set(VCPKG_ZIP_FILE "${CMAKE_BINARY_DIR}/vcpkg.zip")
|
||||
set(VCPKG_EXTRACT_DEST "${CMAKE_BINARY_DIR}/vcpkg-extracted-temp")
|
||||
|
||||
# Use file(DOWNLOAD) to fetch the source archive
|
||||
if(NOT EXISTS "${VCPKG_ZIP_FILE}")
|
||||
message(STATUS "Downloading vcpkg source archive...")
|
||||
file(DOWNLOAD "https://github.com/microsoft/vcpkg/archive/refs/heads/master.zip" "${VCPKG_ZIP_FILE}"
|
||||
SHOW_PROGRESS)
|
||||
message(STATUS "Downloading vcpkg source archive... done")
|
||||
endif()
|
||||
|
||||
# Use file(ARCHIVE_EXTRACT) to unzip the source
|
||||
if(NOT EXISTS "${VCPKG_EXTRACT_DEST}")
|
||||
message(STATUS "Extracting vcpkg archive...")
|
||||
file(ARCHIVE_EXTRACT INPUT "${VCPKG_ZIP_FILE}" DESTINATION "${VCPKG_EXTRACT_DEST}" )
|
||||
|
||||
# Move the extracted content (which is in a directory like vcpkg-master)
|
||||
# to the desired VCPKG_ROOT path defined in your original script.
|
||||
file(GLOB VCPKG_SOURCE_DIR_TMP "${VCPKG_EXTRACT_DEST}/vcpkg-*")
|
||||
file(RENAME "${VCPKG_SOURCE_DIR_TMP}" "${VCPKG_ROOT}")
|
||||
message(STATUS "Extracting vcpkg archive... done")
|
||||
endif()
|
||||
set(_TORQUE_VCPKG_FETCH_RESULT 0)
|
||||
endif()
|
||||
if(WIN32)
|
||||
execute_process(COMMAND "${VCPKG_ROOT}/bootstrap-vcpkg.bat")
|
||||
else()
|
||||
execute_process(COMMAND "${VCPKG_ROOT}/bootstrap-vcpkg.sh")
|
||||
|
||||
if(_TORQUE_VCPKG_FETCH_RESULT EQUAL 0)
|
||||
file(ARCHIVE_EXTRACT INPUT "${VCPKG_ZIP_FILE}" DESTINATION "${VCPKG_EXTRACT_DEST}")
|
||||
file(GLOB VCPKG_SOURCE_DIR_TMP "${VCPKG_EXTRACT_DEST}/vcpkg-*")
|
||||
file(RENAME "${VCPKG_SOURCE_DIR_TMP}" "${VCPKG_ROOT}")
|
||||
file(REMOVE_RECURSE "${VCPKG_EXTRACT_DEST}")
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
file(TO_CMAKE_PATH $ENV{VCPKG_ROOT} VCPKG_ROOT)
|
||||
endif()
|
||||
|
||||
if(NOT EXISTS "${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake")
|
||||
message(FATAL_ERROR
|
||||
"Could not fetch vcpkg into ${VCPKG_ROOT}. If this machine has no network "
|
||||
"access either, copy an existing Tools/CMake/vcpkg checkout from a teammate "
|
||||
"or your build server instead.")
|
||||
endif()
|
||||
|
||||
message(STATUS "vcpkg fetched into ${VCPKG_ROOT} — future configures will skip this step.")
|
||||
endif()
|
||||
set(CMAKE_TOOLCHAIN_FILE "${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake" CACHE STRING "Vcpkg toolchain file")
|
||||
|
||||
# The vcpkg *tool* binary is platform-specific and isn't fetched/committed by
|
||||
# the step above — bootstrap builds/downloads it locally, once per platform.
|
||||
if(WIN32)
|
||||
if(GIT_CI_BUILD)
|
||||
set(VCPKG_TARGET_TRIPLET "x64-windows-mixed-release" CACHE STRING "")
|
||||
else()
|
||||
set(VCPKG_TARGET_TRIPLET "x64-windows-mixed" CACHE STRING "")
|
||||
endif()
|
||||
|
||||
set(_TORQUE_VCPKG_EXE "${VCPKG_ROOT}/vcpkg.exe")
|
||||
else()
|
||||
if(APPLE)
|
||||
if(GIT_CI_BUILD)
|
||||
set(VCPKG_TARGET_TRIPLET "universal-osx-11-release" CACHE STRING "")
|
||||
else()
|
||||
set(VCPKG_TARGET_TRIPLET "universal-osx-11" CACHE STRING "")
|
||||
endif()
|
||||
endif(APPLE)
|
||||
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
if(GIT_CI_BUILD)
|
||||
set(VCPKG_TARGET_TRIPLET "x64-linux-mixed-release" CACHE STRING "")
|
||||
else()
|
||||
set(VCPKG_TARGET_TRIPLET "x64-linux-mixed" CACHE STRING "")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(_TORQUE_VCPKG_EXE "${VCPKG_ROOT}/vcpkg")
|
||||
endif()
|
||||
|
||||
set(VCPKG_OVERLAY_TRIPLETS "${CMAKE_SOURCE_DIR}/Tools/CMake/vcpkg/triplets" CACHE STRING "")
|
||||
set(VCPKG_OVERLAY_PORTS "${CMAKE_SOURCE_DIR}/Tools/CMake/vcpkg/ports" CACHE STRING "")
|
||||
if(NOT EXISTS "${_TORQUE_VCPKG_EXE}")
|
||||
message(STATUS "Bootstrapping vcpkg tool (one-time per platform)...")
|
||||
if(WIN32)
|
||||
execute_process(COMMAND "${VCPKG_ROOT}/bootstrap-vcpkg.bat")
|
||||
else()
|
||||
execute_process(COMMAND "${VCPKG_ROOT}/bootstrap-vcpkg.sh")
|
||||
endif()
|
||||
if(NOT EXISTS "${_TORQUE_VCPKG_EXE}")
|
||||
message(FATAL_ERROR "Failed to bootstrap the vcpkg tool — see output above.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(CMAKE_TOOLCHAIN_FILE "${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake" CACHE STRING "Vcpkg toolchain file")
|
||||
set(VCPKG_MANIFEST_MODE OFF CACHE BOOL "Disable vcpkg manifest mode" FORCE)
|
||||
set(VCPKG_INSTALL_OPTIONS "--clean-after-build" CACHE STRING "")
|
||||
set(VCPKG_OVERLAY_TRIPLETS "${CMAKE_SOURCE_DIR}/Tools/CMake/vcpkg/triplets" CACHE STRING "")
|
||||
set(ENV{VCPKG_LIB_SOURCE_ROOT} "${CMAKE_SOURCE_DIR}/Engine/lib")
|
||||
set(ENV{VCPKG_KEEP_ENV_VARS} "VCPKG_LIB_SOURCE_ROOT")
|
||||
# All include directories to search. Modules should append to this when they want includes to point
|
||||
# into themselves.
|
||||
set(TORQUE_INCLUDE_DIRECTORIES "")
|
||||
if (NOT GIT_IN_USE)
|
||||
execute_process(
|
||||
COMMAND vcpkg install
|
||||
--classic
|
||||
set(TORQUE_VCPKG_ASSET_CACHE "${CMAKE_SOURCE_DIR}/Tools/CMake/vcpkg/vcpkg-assets" CACHE PATH "Local directory of cached vcpkg port source archives")
|
||||
file(MAKE_DIRECTORY "${TORQUE_VCPKG_ASSET_CACHE}")
|
||||
set(ENV{X_VCPKG_ASSET_SOURCES} "clear;x-azurl,file:///${TORQUE_VCPKG_ASSET_CACHE},,readwrite")
|
||||
|
||||
if(WIN32)
|
||||
if(GIT_CI_BUILD)
|
||||
set(VCPKG_TARGET_TRIPLET "x64-windows-mixed-release" CACHE STRING "")
|
||||
else()
|
||||
set(VCPKG_TARGET_TRIPLET "x64-windows-mixed" CACHE STRING "")
|
||||
endif()
|
||||
else()
|
||||
if(APPLE)
|
||||
if(GIT_CI_BUILD)
|
||||
set(VCPKG_TARGET_TRIPLET "universal-osx-11-release" CACHE STRING "")
|
||||
else()
|
||||
set(VCPKG_TARGET_TRIPLET "universal-osx-11" CACHE STRING "")
|
||||
endif()
|
||||
endif(APPLE)
|
||||
if(UNIX AND NOT APPLE)
|
||||
if(GIT_CI_BUILD)
|
||||
set(VCPKG_TARGET_TRIPLET "x64-linux-mixed-release" CACHE STRING "")
|
||||
else()
|
||||
set(VCPKG_TARGET_TRIPLET "x64-linux-mixed" CACHE STRING "")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Single source of truth for everything we get from vcpkg. Add to this list
|
||||
# as you migrate more dependencies — there is no separate manifest to keep
|
||||
# in sync any more. (assimp stays out of this list; it's still built from
|
||||
# Engine/lib/assimp via add_subdirectory.)
|
||||
set(TORQUE_VCPKG_PACKAGES
|
||||
zlib
|
||||
libpng
|
||||
sdl2
|
||||
openal-soft
|
||||
pcre
|
||||
tinyxml2
|
||||
bullet3
|
||||
recastnavigation
|
||||
libogg libvorbis libflac opus libtheora
|
||||
libsndfile[core,external-libs]
|
||||
libsquish
|
||||
)
|
||||
if(TORQUE_TESTING)
|
||||
list(APPEND TORQUE_VCPKG_PACKAGES gtest)
|
||||
endif()
|
||||
if(UNIX AND NOT APPLE)
|
||||
list(APPEND TORQUE_VCPKG_PACKAGES freetype)
|
||||
endif()
|
||||
|
||||
execute_process(
|
||||
COMMAND "${VCPKG_ROOT}/vcpkg" install
|
||||
--triplet=${VCPKG_TARGET_TRIPLET}
|
||||
--overlay-ports=${VCPKG_OVERLAY_PORTS}
|
||||
--overlay-triplets=${VCPKG_OVERLAY_TRIPLETS}
|
||||
libflac libogg libsndfile[external-libs] libtheora libvorbis opus
|
||||
WORKING_DIRECTORY ${VCPKG_ROOT})
|
||||
${TORQUE_VCPKG_PACKAGES}
|
||||
WORKING_DIRECTORY ${VCPKG_ROOT}
|
||||
RESULT_VARIABLE TORQUE_VCPKG_INSTALL_RESULT)
|
||||
if(NOT TORQUE_VCPKG_INSTALL_RESULT EQUAL 0)
|
||||
message(FATAL_ERROR "vcpkg install failed (see above) — third-party dependencies could not be installed.")
|
||||
endif()
|
||||
|
||||
# All include directories to search...
|
||||
set(TORQUE_INCLUDE_DIRECTORIES "")
|
||||
set(TORQUE_ADDITIONAL_LIBRARY_BINARIES "")
|
||||
set(TORQUE_COMPILE_DEFINITIONS ICE_NO_DLL PCRE_STATIC TORQUE_ADVANCED_LIGHTING TORQUE_SHADERGEN
|
||||
TORQUE_OPCODE TORQUE_ASSIMP TORQUE_SDL TORQUE_COLLADA
|
||||
TORQUE_UNICODE UNICODE _UNICODE)
|
||||
|
||||
set(TORQUE_LINK_LIBRARIES collada opcode assimp convexMath glad)
|
||||
# All library binaries to install. Modules should append to this the path of any library binaries (.so, .dylib, .dll)
|
||||
# that should be installed next to the executable.
|
||||
set(TORQUE_ADDITIONAL_LIBRARY_BINARIES "")
|
||||
|
|
@ -96,12 +150,6 @@ set(TORQUE_COMPILE_DEFINITIONS ICE_NO_DLL PCRE_STATIC TORQUE_ADVANCED_LIGHTING T
|
|||
TORQUE_OPCODE TORQUE_ASSIMP TORQUE_SDL TORQUE_COLLADA
|
||||
TORQUE_UNICODE UNICODE _UNICODE)
|
||||
|
||||
# All link libraries. Modules should append to this the path to specify additional link libraries (.a, .lib, .dylib, .so)
|
||||
set(TORQUE_LINK_LIBRARIES png_static tinyxml2 collada squish opcode assimp SDL2 glad pcre convexMath zlib)
|
||||
|
||||
if(TORQUE_TESTING)
|
||||
set(TORQUE_LINK_LIBRARIES ${TORQUE_LINK_LIBRARIES} gtest gmock)
|
||||
endif()
|
||||
|
||||
if(NOT WIN32)
|
||||
set(WIN32 OFF CACHE BOOL "" FORCE)
|
||||
|
|
|
|||
|
|
@ -1,13 +0,0 @@
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 9396130..11ef59d 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -122,7 +122,7 @@ else()
|
||||
endif()
|
||||
|
||||
|
||||
-if(ANDROID AND CMAKE_SYSTEM_VERSION VERSION_LESS 24 AND (CMAKE_SYSTEM_PROCESSOR MATCHES "i686" OR CMAKE_SYSTEM_PROCESSOR MATCHES "armv7-a"))
|
||||
+if(ANDROID AND ANDROID_NATIVE_API_LEVEL VERSION_LESS "24" AND (CMAKE_SYSTEM_PROCESSOR MATCHES "i686" OR CMAKE_SYSTEM_PROCESSOR MATCHES "armv7-a"))
|
||||
# fseeko/ftello may link, but it's not usable before Android API 24 on 32-bit Android
|
||||
# https://android.googlesource.com/platform/bionic/+/main/docs/32-bit-abi.md
|
||||
message(STATUS "Disabling fseeko/ftello for 32-bit Android before API 24")
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index c83dd83..2d1a7e6 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -82,9 +82,11 @@ if(HAVE_WERROR_FLAG)
|
||||
option(ENABLE_WERROR "Enable -Werror in all Makefiles" OFF)
|
||||
endif()
|
||||
|
||||
+if(MSVC AND NOT WITH_ASM)
|
||||
+ add_compile_options(/wd4267 /wd4996)
|
||||
+endif()
|
||||
+
|
||||
add_compile_options(
|
||||
- $<$<BOOL:${MSVC}>:/wd4267>
|
||||
- $<$<BOOL:${MSVC}>:/wd4996>
|
||||
$<$<BOOL:${ENABLE_WERROR}>:-Werror>
|
||||
$<$<AND:$<COMPILE_LANGUAGE:CXX>,$<BOOL:${HAVE_WEFFCXX_FLAG}>>:-Weffc++>
|
||||
$<$<AND:$<COMPILE_LANGUAGE:C>,$<BOOL:${HAVE_DECL_AFTER_STMT_FLAG}>>:-Wdeclaration-after-statement>)
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
diff --git a/flac-config.cmake.in b/flac-config.cmake.in
|
||||
index bcafc4c8..dcf299dd 100644
|
||||
--- a/flac-config.cmake.in
|
||||
+++ b/flac-config.cmake.in
|
||||
@@ -5,6 +5,10 @@ if(NOT TARGET Ogg::ogg)
|
||||
find_dependency(Ogg)
|
||||
endif()
|
||||
|
||||
+if (@ENABLE_MULTITHREADING@)
|
||||
+ find_dependency(Threads)
|
||||
+endif()
|
||||
+
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/targets.cmake")
|
||||
|
||||
if(TARGET FLAC::FLAC)
|
||||
|
|
@ -1,80 +0,0 @@
|
|||
set(LOCAL_ARCHIVE "$ENV{VCPKG_LIB_SOURCE_ROOT}/xiph-flac-1.5.0.tar.gz")
|
||||
|
||||
vcpkg_extract_source_archive(
|
||||
SOURCE_PATH
|
||||
ARCHIVE "${LOCAL_ARCHIVE}"
|
||||
PATCHES
|
||||
android-cmake.diff
|
||||
fix-compile-options.patch
|
||||
fix-find-threads.patch
|
||||
)
|
||||
|
||||
if("asm" IN_LIST FEATURES)
|
||||
vcpkg_find_acquire_program(NASM)
|
||||
get_filename_component(NASM_PATH "${NASM}" DIRECTORY)
|
||||
vcpkg_add_to_path("${NASM_PATH}")
|
||||
endif()
|
||||
|
||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
FEATURES
|
||||
asm WITH_ASM
|
||||
stack-protector WITH_STACK_PROTECTOR
|
||||
multithreading ENABLE_MULTITHREADING
|
||||
)
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
${FEATURE_OPTIONS}
|
||||
-DBUILD_PROGRAMS=OFF
|
||||
-DBUILD_EXAMPLES=OFF
|
||||
-DBUILD_DOCS=OFF
|
||||
-DBUILD_TESTING=OFF
|
||||
-DINSTALL_MANPAGES=OFF
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
|
||||
vcpkg_cmake_config_fixup(PACKAGE_NAME FLAC CONFIG_PATH lib/cmake/FLAC)
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
||||
file(REMOVE "${CURRENT_PACKAGES_DIR}/share/LICENSE")
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/FLAC/export.h"
|
||||
"#if defined(FLAC__NO_DLL)"
|
||||
"#if 0"
|
||||
)
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/FLAC++/export.h"
|
||||
"#if defined(FLAC__NO_DLL)"
|
||||
"#if 0"
|
||||
)
|
||||
else()
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/FLAC/export.h"
|
||||
"#if defined(FLAC__NO_DLL)"
|
||||
"#if 1"
|
||||
)
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/FLAC++/export.h"
|
||||
"#if defined(FLAC__NO_DLL)"
|
||||
"#if 1"
|
||||
)
|
||||
endif()
|
||||
|
||||
if(VCPKG_TARGET_IS_WINDOWS)
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/flac.pc" " -lm" "")
|
||||
|
||||
if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/flac.pc")
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/flac.pc" " -lm" "")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
vcpkg_fixup_pkgconfig()
|
||||
|
||||
# This license (BSD) is relevant only for library - if someone would want to install
|
||||
# FLAC cmd line tools as well additional license (GPL) should be included
|
||||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING.Xiph")
|
||||
|
||||
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
The package libflac provides CMake targets:
|
||||
|
||||
find_package(FLAC CONFIG REQUIRED)
|
||||
target_link_libraries(main PRIVATE FLAC::FLAC)
|
||||
|
||||
# Or use the C++ API
|
||||
find_package(FLAC CONFIG REQUIRED)
|
||||
target_link_libraries(main PRIVATE FLAC::FLAC++)
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
{
|
||||
"name": "libflac",
|
||||
"version": "1.5.0",
|
||||
"description": "Library for manipulating FLAC files",
|
||||
"homepage": "https://xiph.org/flac/",
|
||||
"license": "BSD-3-Clause",
|
||||
"dependencies": [
|
||||
"libogg",
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
}
|
||||
],
|
||||
"default-features": [
|
||||
{
|
||||
"name": "stack-protector",
|
||||
"platform": "!emscripten"
|
||||
}
|
||||
],
|
||||
"features": {
|
||||
"asm": {
|
||||
"description": "Use any assembly optimization routines",
|
||||
"supports": "x86"
|
||||
},
|
||||
"multithreading": {
|
||||
"description": "Enable multithreading if pthreads is available"
|
||||
},
|
||||
"stack-protector": {
|
||||
"description": "Build with stack smashing protection",
|
||||
"supports": "!emscripten"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
set(LOCAL_ARCHIVE "$ENV{VCPKG_LIB_SOURCE_ROOT}/xiph-ogg-v1.3.6.tar.gz")
|
||||
|
||||
vcpkg_extract_source_archive(
|
||||
SOURCE_PATH
|
||||
ARCHIVE "${LOCAL_ARCHIVE}"
|
||||
)
|
||||
|
||||
if(VCPKG_TARGET_IS_MINGW)
|
||||
vcpkg_replace_string("${SOURCE_PATH}/win32/ogg.def" "LIBRARY ogg" "LIBRARY libogg")
|
||||
endif()
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 #https://gitlab.xiph.org/xiph/ogg/-/issues/2304
|
||||
-DINSTALL_DOCS=OFF
|
||||
-DINSTALL_PKG_CONFIG_MODULE=ON
|
||||
-DBUILD_TESTING=OFF
|
||||
MAYBE_UNUSED_VARIABLES
|
||||
CMAKE_POLICY_VERSION_MINIMUM
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
|
||||
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/Ogg PACKAGE_NAME ogg)
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
vcpkg_fixup_pkgconfig()
|
||||
|
||||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
{
|
||||
"name": "libogg",
|
||||
"version": "1.3.6",
|
||||
"port-version": 1,
|
||||
"description": "Ogg is a multimedia container format, and the native file and stream format for the Xiph.org multimedia codecs.",
|
||||
"homepage": "https://www.xiph.org/ogg",
|
||||
"license": "BSD-3-Clause",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index b501f08..022864f 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -855,11 +847,6 @@ if (ENABLE_PACKAGE_CONFIG)
|
||||
${CMAKE_CURRENT_BINARY_DIR}/SndFileConfigVersion.cmake
|
||||
DESTINATION ${CMAKE_INSTALL_PACKAGEDIR}
|
||||
)
|
||||
-
|
||||
- if (NOT BUILD_SHARED_LIBS AND FIND_MODULES_INSTALL_LIST)
|
||||
- file(COPY ${FIND_MODULES_INSTALL_LIST} DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
|
||||
- install(FILES ${FIND_MODULES_INSTALL_LIST} DESTINATION ${CMAKE_INSTALL_PACKAGEDIR})
|
||||
- endif ()
|
||||
else ()
|
||||
|
||||
install (TARGETS sndfile ${sdnfile_PROGRAMS}
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index b501f08..946c321 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -236,6 +236,10 @@ if (INSTALL_PKGCONFIG_MODULE)
|
||||
if (ENABLE_MPEG)
|
||||
set (EXTERNAL_MPEG_REQUIRE "libmpg123")
|
||||
set (EXTERNAL_MPEG_LIBS "-lmp3lame")
|
||||
+ get_target_property(mp3lame_binary mp3lame::mp3lame IMPORTED_LOCATION_RELEASE)
|
||||
+ if(mp3lame_binary MATCHES "mp3lame-static")
|
||||
+ set (EXTERNAL_MPEG_LIBS "-lmp3lame-static -lmpghip-static")
|
||||
+ endif()
|
||||
endif ()
|
||||
|
||||
configure_file (sndfile.pc.in sndfile.pc @ONLY)
|
||||
|
|
@ -1,61 +0,0 @@
|
|||
set(LOCAL_ARCHIVE "$ENV{VCPKG_LIB_SOURCE_ROOT}/libsndfile-libsndfile-1.2.2.tar.gz")
|
||||
|
||||
vcpkg_extract_source_archive(
|
||||
SOURCE_PATH
|
||||
ARCHIVE "${LOCAL_ARCHIVE}"
|
||||
PATCHES
|
||||
001-avoid-installing-find-modules.patch
|
||||
mp3lame-static.diff
|
||||
)
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
||||
vcpkg_find_acquire_program(PYTHON3)
|
||||
endif()
|
||||
|
||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
FEATURES
|
||||
external-libs ENABLE_EXTERNAL_LIBS
|
||||
mpeg ENABLE_MPEG
|
||||
regtest BUILD_REGTEST
|
||||
)
|
||||
|
||||
if(VCPKG_TARGET_IS_UWP)
|
||||
set(VCPKG_C_FLAGS "/sdl- ${VCPKG_C_FLAGS}")
|
||||
set(VCPKG_CXX_FLAGS "/sdl- ${VCPKG_CXX_FLAGS}")
|
||||
endif()
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
-DBUILD_EXAMPLES=OFF
|
||||
-DBUILD_TESTING=OFF
|
||||
-DENABLE_BOW_DOCS=OFF
|
||||
-DBUILD_PROGRAMS=OFF
|
||||
-DBUILD_REGTEST=OFF
|
||||
-DCMAKE_FIND_PACKAGE_PREFER_CONFIG=ON
|
||||
-DCMAKE_DEBUG_POSTFIX="d"
|
||||
-DPYTHON_EXECUTABLE=${PYTHON3}
|
||||
${FEATURE_OPTIONS}
|
||||
MAYBE_UNUSED_VARIABLES
|
||||
PYTHON_EXECUTABLE
|
||||
CMAKE_DEBUG_POSTFIX
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
|
||||
if(EXISTS "${CURRENT_PACKAGES_DIR}/cmake")
|
||||
set(CONFIG_PATH cmake)
|
||||
else()
|
||||
set(CONFIG_PATH lib/cmake/SndFile)
|
||||
endif()
|
||||
|
||||
vcpkg_cmake_config_fixup(PACKAGE_NAME SndFile CONFIG_PATH "${CONFIG_PATH}")
|
||||
vcpkg_fixup_pkgconfig(SYSTEM_LIBRARIES m)
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/doc")
|
||||
|
||||
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
|
|
@ -1,51 +0,0 @@
|
|||
{
|
||||
"name": "libsndfile",
|
||||
"version-semver": "1.2.2",
|
||||
"port-version": 1,
|
||||
"description": "A library for reading and writing audio files",
|
||||
"homepage": "https://github.com/erikd/libsndfile",
|
||||
"license": "LGPL-2.1-or-later",
|
||||
"supports": "!xbox",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
}
|
||||
],
|
||||
"default-features": [
|
||||
"external-libs"
|
||||
],
|
||||
"features": {
|
||||
"experimental": {
|
||||
"description": "Enable experimental code",
|
||||
"dependencies": [
|
||||
"speex"
|
||||
]
|
||||
},
|
||||
"external-libs": {
|
||||
"description": "Enable FLAC, Vorbis, and Opus codecs",
|
||||
"dependencies": [
|
||||
"libflac",
|
||||
"libvorbis",
|
||||
"opus"
|
||||
]
|
||||
},
|
||||
"mpeg": {
|
||||
"description": "Enable MPEG codecs",
|
||||
"dependencies": [
|
||||
"mp3lame",
|
||||
"mpg123"
|
||||
]
|
||||
},
|
||||
"regtest": {
|
||||
"description": "Build regtest",
|
||||
"dependencies": [
|
||||
"sqlite3"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,160 +0,0 @@
|
|||
cmake_minimum_required(VERSION 3.30)
|
||||
project(theora LANGUAGES C)
|
||||
|
||||
set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}")
|
||||
set(OGG_REQUIRED_VERSION 1.3.4)
|
||||
find_package(Ogg "${OGG_REQUIRED_VERSION}" CONFIG REQUIRED)
|
||||
|
||||
file(GLOB HEADERS
|
||||
"include/theora/codec.h"
|
||||
"include/theora/theora.h"
|
||||
"include/theora/theoradec.h"
|
||||
"include/theora/theoraenc.h"
|
||||
)
|
||||
|
||||
if(MSVC)
|
||||
set(LIBTHEORA_COMMON_X86
|
||||
"lib/x86_vc/mmxfrag.c"
|
||||
"lib/x86_vc/mmxidct.c"
|
||||
"lib/x86_vc/mmxstate.c"
|
||||
"lib/x86_vc/x86cpu.c"
|
||||
"lib/x86_vc/x86state.c"
|
||||
)
|
||||
else()
|
||||
set(LIBTHEORA_COMMON_X86
|
||||
"lib/x86/mmxfrag.c"
|
||||
"lib/x86/mmxidct.c"
|
||||
"lib/x86/mmxstate.c"
|
||||
"lib/x86/sse2idct.c"
|
||||
"lib/x86/x86cpu.c"
|
||||
"lib/x86/x86state.c"
|
||||
)
|
||||
endif()
|
||||
|
||||
set(LIBTHEORA_COMMON
|
||||
"lib/apiwrapper.c"
|
||||
"lib/bitpack.c"
|
||||
"lib/dequant.c"
|
||||
"lib/fragment.c"
|
||||
"lib/idct.c"
|
||||
"lib/info.c"
|
||||
"lib/internal.c"
|
||||
"lib/state.c"
|
||||
"lib/quant.c"
|
||||
|
||||
${LIBTHEORA_COMMON_X86}
|
||||
)
|
||||
|
||||
if(MSVC)
|
||||
set(LIBTHEORA_ENC_X86
|
||||
"lib/x86_vc/mmxencfrag.c"
|
||||
"lib/x86_vc/mmxfdct.c"
|
||||
"lib/x86_vc/x86enc.c"
|
||||
)
|
||||
else()
|
||||
set(LIBTHEORA_ENC_X86
|
||||
"lib/x86/mmxencfrag.c"
|
||||
"lib/x86/mmxfdct.c"
|
||||
"lib/x86/x86enc.c"
|
||||
"lib/x86/x86enquant.c"
|
||||
"lib/x86/sse2encfrag.c"
|
||||
)
|
||||
endif()
|
||||
|
||||
set(LIBTHEORA_ENC
|
||||
"lib/analyze.c"
|
||||
"lib/encapiwrapper.c"
|
||||
"lib/encfrag.c"
|
||||
"lib/encinfo.c"
|
||||
"lib/encode.c"
|
||||
"lib/enquant.c"
|
||||
"lib/fdct.c"
|
||||
"lib/huffenc.c"
|
||||
"lib/mathops.c"
|
||||
"lib/mcenc.c"
|
||||
"lib/rate.c"
|
||||
"lib/tokenize.c"
|
||||
|
||||
${LIBTHEORA_ENC_X86}
|
||||
)
|
||||
|
||||
set(LIBTHEORA_DEC
|
||||
"lib/decapiwrapper.c"
|
||||
"lib/decinfo.c"
|
||||
"lib/decode.c"
|
||||
"lib/huffdec.c"
|
||||
)
|
||||
|
||||
add_definitions(-D_CRT_SECURE_NO_DEPRECATE)
|
||||
add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE)
|
||||
|
||||
option(USE_X86 "Use x86 optimization" OFF)
|
||||
if(USE_X86)
|
||||
add_definitions(-DOC_X86_ASM)
|
||||
endif()
|
||||
|
||||
if (BUILD_SHARED_LIBS)
|
||||
add_definitions(-DLIBTHEORA_EXPORTS)
|
||||
endif()
|
||||
|
||||
add_library(theora-common OBJECT ${LIBTHEORA_COMMON} ${HEADERS})
|
||||
target_link_libraries(theora-common PUBLIC Ogg::ogg)
|
||||
target_include_directories(theora-common PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include> $<INSTALL_INTERFACE:include>)
|
||||
add_library(theora-enc OBJECT ${LIBTHEORA_ENC} ${HEADERS})
|
||||
target_link_libraries(theora-enc PUBLIC Ogg::ogg)
|
||||
target_include_directories(theora-enc PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include> $<INSTALL_INTERFACE:include>)
|
||||
add_library(theora-dec OBJECT ${LIBTHEORA_DEC} ${HEADERS})
|
||||
target_link_libraries(theora-dec PUBLIC Ogg::ogg)
|
||||
target_include_directories(theora-dec PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include> $<INSTALL_INTERFACE:include>)
|
||||
|
||||
add_library(theora $<TARGET_OBJECTS:theora-common> $<TARGET_OBJECTS:theora-enc> $<TARGET_OBJECTS:theora-dec> "libtheora.def")
|
||||
target_link_libraries(theora PUBLIC Ogg::ogg)
|
||||
target_include_directories(theora PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include> $<INSTALL_INTERFACE:include>)
|
||||
|
||||
add_library(theoraenc $<TARGET_OBJECTS:theora-common> $<TARGET_OBJECTS:theora-enc> "win32/xmingw32/libtheoraenc-all.def")
|
||||
target_link_libraries(theoraenc PUBLIC Ogg::ogg)
|
||||
target_include_directories(theoraenc PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include> $<INSTALL_INTERFACE:include>)
|
||||
|
||||
add_library(theoradec $<TARGET_OBJECTS:theora-common> $<TARGET_OBJECTS:theora-dec> "win32/xmingw32/libtheoradec-all.def")
|
||||
target_link_libraries(theoradec PUBLIC Ogg::ogg)
|
||||
target_include_directories(theoradec PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include> $<INSTALL_INTERFACE:include>)
|
||||
|
||||
include(CMakePackageConfigHelpers)
|
||||
|
||||
configure_package_config_file(unofficial-theora-config.cmake.in unofficial-theora-config.cmake
|
||||
INSTALL_DESTINATION "lib/unofficial-theora")
|
||||
|
||||
install(FILES ${HEADERS} DESTINATION include/theora)
|
||||
|
||||
install(
|
||||
FILES "${CMAKE_CURRENT_BINARY_DIR}/unofficial-theora-config.cmake"
|
||||
DESTINATION "lib/unofficial-theora"
|
||||
)
|
||||
|
||||
install(TARGETS theora theoraenc theoradec
|
||||
EXPORT unofficial-theora-targets
|
||||
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
|
||||
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
||||
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
||||
)
|
||||
|
||||
install(EXPORT unofficial-theora-targets
|
||||
NAMESPACE unofficial::theora::
|
||||
DESTINATION "lib/unofficial-theora"
|
||||
)
|
||||
|
||||
block(SCOPE_FOR VARIABLES)
|
||||
set(prefix "${CMAKE_INSTALL_PREFIX}")
|
||||
set(libdir "\${prefix}/lib")
|
||||
set(exec_prefix "\${prefix}")
|
||||
set(includedir "\${prefix}/include")
|
||||
set(THEORA_LIBOGG_REQ_VERSION "${OGG_REQUIRED_VERSION}")
|
||||
configure_file(theora.pc.in theora.pc @ONLY)
|
||||
configure_file(theoradec.pc.in theoradec.pc @ONLY)
|
||||
configure_file(theoraenc.pc.in theoraenc.pc @ONLY)
|
||||
endblock()
|
||||
|
||||
install(
|
||||
FILES "${PROJECT_BINARY_DIR}/theora.pc" "${PROJECT_BINARY_DIR}/theoradec.pc" "${PROJECT_BINARY_DIR}/theoraenc.pc"
|
||||
DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig"
|
||||
)
|
||||
|
|
@ -1,61 +0,0 @@
|
|||
EXPORTS
|
||||
; Old alpha API
|
||||
theora_version_string
|
||||
theora_version_number
|
||||
theora_decode_header
|
||||
theora_decode_init
|
||||
theora_decode_packetin
|
||||
theora_decode_YUVout
|
||||
theora_control
|
||||
theora_packet_isheader
|
||||
theora_packet_iskeyframe
|
||||
theora_granule_shift
|
||||
theora_granule_frame
|
||||
theora_granule_time
|
||||
theora_info_init
|
||||
theora_info_clear
|
||||
theora_clear
|
||||
theora_comment_init
|
||||
theora_comment_add
|
||||
theora_comment_add_tag
|
||||
theora_comment_query
|
||||
theora_comment_query_count
|
||||
theora_comment_clear
|
||||
; New theora-exp API
|
||||
th_version_string
|
||||
th_version_number
|
||||
th_decode_headerin
|
||||
th_decode_alloc
|
||||
th_setup_free
|
||||
th_decode_ctl
|
||||
th_decode_packetin
|
||||
th_decode_ycbcr_out
|
||||
th_decode_free
|
||||
th_packet_isheader
|
||||
th_packet_iskeyframe
|
||||
th_granule_frame
|
||||
th_granule_time
|
||||
th_info_init
|
||||
th_info_clear
|
||||
th_comment_init
|
||||
th_comment_add
|
||||
th_comment_add_tag
|
||||
th_comment_query
|
||||
th_comment_query_count
|
||||
th_comment_clear
|
||||
; Old alpha API
|
||||
theora_encode_init
|
||||
theora_encode_YUVin
|
||||
theora_encode_packetout
|
||||
theora_encode_header
|
||||
theora_encode_comment
|
||||
theora_encode_tables
|
||||
; New theora-exp API
|
||||
th_encode_alloc
|
||||
th_encode_ctl
|
||||
th_encode_flushheader
|
||||
th_encode_ycbcr_in
|
||||
th_encode_packetout
|
||||
th_encode_free
|
||||
TH_VP31_QUANT_INFO
|
||||
TH_VP31_HUFF_CODES
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
set(LOCAL_ARCHIVE "$ENV{VCPKG_LIB_SOURCE_ROOT}/xiph-theora-v1.2.0.tar.gz")
|
||||
|
||||
vcpkg_extract_source_archive(
|
||||
SOURCE_PATH
|
||||
ARCHIVE "${LOCAL_ARCHIVE}"
|
||||
)
|
||||
|
||||
file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")
|
||||
file(COPY "${CMAKE_CURRENT_LIST_DIR}/libtheora.def" DESTINATION "${SOURCE_PATH}")
|
||||
file(COPY "${CMAKE_CURRENT_LIST_DIR}/unofficial-theora-config.cmake.in" DESTINATION "${SOURCE_PATH}")
|
||||
|
||||
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
|
||||
set(THEORA_X86_OPT ON)
|
||||
else()
|
||||
set(THEORA_X86_OPT OFF)
|
||||
endif()
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
"-DVERSION:STRING=${VERSION}"
|
||||
-DUSE_X86=${THEORA_X86_OPT}
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
vcpkg_cmake_config_fixup(CONFIG_PATH "lib/unofficial-theora" PACKAGE_NAME "unofficial-theora")
|
||||
vcpkg_fixup_pkgconfig()
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
|
||||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING" "${SOURCE_PATH}/LICENSE")
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
@PACKAGE_INIT@
|
||||
include(CMakeFindDependencyMacro)
|
||||
|
||||
find_dependency(Ogg CONFIG)
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/unofficial-theora-targets.cmake")
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
{
|
||||
"name": "libtheora",
|
||||
"version": "1.2.0",
|
||||
"description": "Theora is a free and open video compression format from the Xiph.org Foundation.",
|
||||
"homepage": "https://github.com/xiph/theora",
|
||||
"license": null,
|
||||
"dependencies": [
|
||||
"libogg",
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
diff --git a/win32/vorbis.def b/win32/vorbis.def
|
||||
index 9cca64d..a80fff7 100644
|
||||
--- a/win32/vorbis.def
|
||||
+++ b/win32/vorbis.def
|
||||
@@ -49,11 +49,4 @@ vorbis_synthesis_idheader
|
||||
;
|
||||
vorbis_window
|
||||
;_analysis_output_always
|
||||
-vorbis_encode_init
|
||||
-vorbis_encode_setup_managed
|
||||
-vorbis_encode_setup_vbr
|
||||
-vorbis_encode_init_vbr
|
||||
-vorbis_encode_setup_init
|
||||
-vorbis_encode_ctl
|
||||
-;
|
||||
vorbis_version_string
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index f377c428..07530304 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -60,6 +60,9 @@ message(STATUS "Configuring ${PROJECT_NAME} ${PROJECT_VERSION}")
|
||||
# Find math library
|
||||
|
||||
check_library_exists(m floor "" HAVE_LIBM)
|
||||
+if(HAVE_LIBM)
|
||||
+ set(VORBIS_LIBS "-lm")
|
||||
+endif()
|
||||
|
||||
# Find ogg dependency
|
||||
find_package(Ogg REQUIRED)
|
||||
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
diff --git a/win32/vorbis.def b/win32/vorbis.def
|
||||
index 1310b6c..de14385 100644
|
||||
--- a/win32/vorbis.def
|
||||
+++ b/win32/vorbis.def
|
||||
@@ -1,6 +1,5 @@
|
||||
; vorbis.def
|
||||
;
|
||||
-LIBRARY
|
||||
EXPORTS
|
||||
_floor_P
|
||||
_mapping_P
|
||||
diff --git a/win32/vorbisenc.def b/win32/vorbisenc.def
|
||||
index 79af064..40a3e39 100644
|
||||
--- a/win32/vorbisenc.def
|
||||
+++ b/win32/vorbisenc.def
|
||||
@@ -1,6 +1,5 @@
|
||||
; vorbisenc.def
|
||||
;
|
||||
-LIBRARY
|
||||
|
||||
EXPORTS
|
||||
vorbis_encode_init
|
||||
diff --git a/win32/vorbisfile.def b/win32/vorbisfile.def
|
||||
index 4dc5549..243795d 100644
|
||||
--- a/win32/vorbisfile.def
|
||||
+++ b/win32/vorbisfile.def
|
||||
@@ -1,6 +1,5 @@
|
||||
; vorbisfile.def
|
||||
;
|
||||
-LIBRARY
|
||||
EXPORTS
|
||||
ov_clear
|
||||
ov_open
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
diff --git a/cmake/VorbisConfig.cmake.in b/cmake/VorbisConfig.cmake.in
|
||||
index 6fc07941..c762ba55 100644
|
||||
--- a/cmake/VorbisConfig.cmake.in
|
||||
+++ b/cmake/VorbisConfig.cmake.in
|
||||
@@ -1,7 +1,7 @@
|
||||
@PACKAGE_INIT@
|
||||
|
||||
include(CMakeFindDependencyMacro)
|
||||
-find_dependency(Ogg REQUIRED)
|
||||
+find_dependency(Ogg CONFIG)
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/VorbisTargets.cmake)
|
||||
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
set(LOCAL_ARCHIVE "$ENV{VCPKG_LIB_SOURCE_ROOT}/xiph-vorbis-v1.3.7.tar.gz")
|
||||
|
||||
vcpkg_extract_source_archive(
|
||||
SOURCE_PATH
|
||||
ARCHIVE "${LOCAL_ARCHIVE}"
|
||||
PATCHES
|
||||
0001-Dont-export-vorbisenc-functions.patch
|
||||
0002-Fixup-pkgconfig-libs.patch
|
||||
0003-def-mingw-compat.patch
|
||||
0004-ogg-find-dependency.patch
|
||||
)
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 # https://github.com/xiph/vorbis/issues/113
|
||||
MAYBE_UNUSED_VARIABLES
|
||||
CMAKE_POLICY_VERSION_MINIMUM
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
vcpkg_cmake_config_fixup(PACKAGE_NAME Vorbis CONFIG_PATH "lib/cmake/Vorbis")
|
||||
vcpkg_fixup_pkgconfig()
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
|
||||
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
||||
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
The package libvorbis provides CMake targets:
|
||||
|
||||
# Vorbis reference encoder and decoder, low-level API
|
||||
find_package(Vorbis CONFIG REQUIRED)
|
||||
target_link_libraries(main PRIVATE Vorbis::vorbis)
|
||||
|
||||
# Audio stream decoding and basic manipulation, high-level API
|
||||
find_package(Vorbis CONFIG REQUIRED)
|
||||
target_link_libraries(main PRIVATE Vorbis::vorbisfile)
|
||||
|
||||
# Convenience API for setting up an encoding environment
|
||||
find_package(Vorbis CONFIG REQUIRED)
|
||||
target_link_libraries(main PRIVATE Vorbis::vorbisenc)
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
{
|
||||
"name": "libvorbis",
|
||||
"version": "1.3.7",
|
||||
"port-version": 4,
|
||||
"description": "Ogg Vorbis is a fully open, non-proprietary, patent-and-royalty-free, general-purpose compressed audio format",
|
||||
"homepage": "https://github.com/xiph/vorbis",
|
||||
"license": "BSD-3-Clause",
|
||||
"dependencies": [
|
||||
"libogg",
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
diff --git a/cmake/OpusPackageVersion.cmake b/cmake/OpusPackageVersion.cmake
|
||||
index 447ce3b..15ebd8e 100644
|
||||
--- a/cmake/OpusPackageVersion.cmake
|
||||
+++ b/cmake/OpusPackageVersion.cmake
|
||||
@@ -4,7 +4,9 @@ endif()
|
||||
set(__opus_version INCLUDED)
|
||||
|
||||
function(get_package_version PACKAGE_VERSION PROJECT_VERSION)
|
||||
-
|
||||
+ set(PACKAGE_VERSION "0" CACHE STRING "opus package version")
|
||||
+ set(PROJECT_VERSION "0" CACHE STRING "opus project version")
|
||||
+ return()
|
||||
find_package(Git)
|
||||
if(GIT_FOUND AND EXISTS "${CMAKE_CURRENT_LIST_DIR}/.git")
|
||||
execute_process(COMMAND ${GIT_EXECUTABLE}
|
||||
|
|
@ -1,57 +0,0 @@
|
|||
set(LOCAL_ARCHIVE "$ENV{VCPKG_LIB_SOURCE_ROOT}/xiph-opus-v1.5.2.tar.gz")
|
||||
|
||||
vcpkg_extract_source_archive(
|
||||
SOURCE_PATH
|
||||
ARCHIVE "${LOCAL_ARCHIVE}"
|
||||
PATCHES fix-pkgconfig-version.patch
|
||||
)
|
||||
|
||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
FEATURES
|
||||
avx2 AVX2_SUPPORTED
|
||||
)
|
||||
|
||||
set(STACK_PROTECTOR ON)
|
||||
set(ADDITIONAL_OPUS_OPTIONS "")
|
||||
if(VCPKG_TARGET_IS_MINGW)
|
||||
set(STACK_PROTECTOR OFF)
|
||||
string(APPEND VCPKG_C_FLAGS "-D_FORTIFY_SOURCE=0")
|
||||
string(APPEND VCPKG_CXX_FLAGS "-D_FORTIFY_SOURCE=0")
|
||||
if(VCPKG_TARGET_ARCHITECTURE MATCHES "^(ARM|arm)64$")
|
||||
list(APPEND ADDITIONAL_OPUS_OPTIONS "-DOPUS_USE_NEON=OFF") # for version 1.3.1 (remove for future Opus release)
|
||||
list(APPEND ADDITIONAL_OPUS_OPTIONS "-DOPUS_DISABLE_INTRINSICS=ON") # for HEAD (and future Opus release)
|
||||
endif()
|
||||
elseif(VCPKG_TARGET_IS_WINDOWS)
|
||||
if(VCPKG_CRT_LINKAGE STREQUAL "static")
|
||||
list(APPEND ADDITIONAL_OPUS_OPTIONS "-DOPUS_STATIC_RUNTIME=ON")
|
||||
endif()
|
||||
elseif(VCPKG_TARGET_IS_EMSCRIPTEN)
|
||||
set(STACK_PROTECTOR OFF)
|
||||
endif()
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS ${FEATURE_OPTIONS}
|
||||
-DPACKAGE_VERSION=${VERSION}
|
||||
-DOPUS_STACK_PROTECTOR=${STACK_PROTECTOR}
|
||||
-DOPUS_INSTALL_PKG_CONFIG_MODULE=ON
|
||||
-DOPUS_INSTALL_CMAKE_CONFIG_MODULE=ON
|
||||
-DOPUS_BUILD_PROGRAMS=OFF
|
||||
-DOPUS_BUILD_TESTING=OFF
|
||||
${ADDITIONAL_OPUS_OPTIONS}
|
||||
MAYBE_UNUSED_VARIABLES
|
||||
OPUS_USE_NEON
|
||||
OPUS_DISABLE_INTRINSICS
|
||||
)
|
||||
vcpkg_cmake_install()
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/Opus)
|
||||
vcpkg_fixup_pkgconfig(SYSTEM_LIBRARIES m)
|
||||
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/lib/cmake"
|
||||
"${CURRENT_PACKAGES_DIR}/lib/cmake"
|
||||
"${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
|
||||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
{
|
||||
"name": "opus",
|
||||
"version": "1.5.2",
|
||||
"port-version": 1,
|
||||
"description": "Totally open, royalty-free, highly versatile audio codec",
|
||||
"homepage": "https://github.com/xiph/opus",
|
||||
"license": "BSD-3-Clause",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
}
|
||||
],
|
||||
"features": {
|
||||
"avx2": {
|
||||
"description": "Builds the library with avx2 instruction set"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -16,4 +16,8 @@ set(VCPKG_OSX_DEPLOYMENT_TARGET 11.0)
|
|||
set(VCPKG_C_FLAGS -mmacosx-version-min=11.0)
|
||||
set(VCPKG_CXX_FLAGS -mmacosx-version-min=11.0)
|
||||
|
||||
set(VCPKG_BUILD_TYPE release)
|
||||
set(VCPKG_BUILD_TYPE release)
|
||||
|
||||
set(VCPKG_CMAKE_CONFIGURE_OPTIONS
|
||||
-DPNG_ARM_NEON=off
|
||||
)
|
||||
|
|
@ -15,3 +15,7 @@ set(VCPKG_CMAKE_SYSTEM_VERSION 11.0)
|
|||
set(VCPKG_OSX_DEPLOYMENT_TARGET 11.0)
|
||||
set(VCPKG_C_FLAGS -mmacosx-version-min=11.0)
|
||||
set(VCPKG_CXX_FLAGS -mmacosx-version-min=11.0)
|
||||
|
||||
set(VCPKG_CMAKE_CONFIGURE_OPTIONS
|
||||
-DPNG_ARM_NEON=off
|
||||
)
|
||||
|
|
|
|||
|
|
@ -8,4 +8,9 @@ else()
|
|||
set(VCPKG_LIBRARY_LINKAGE static)
|
||||
endif()
|
||||
|
||||
set(VCPKG_BUILD_TYPE release)
|
||||
set(VCPKG_BUILD_TYPE release)
|
||||
|
||||
if(PORT MATCHES "gtest")
|
||||
set(VCPKG_CXX_FLAGS "-Zc:wchar_t-")
|
||||
set(VCPKG_C_FLAGS "-Zc:wchar_t-")
|
||||
endif()
|
||||
|
|
@ -7,3 +7,8 @@ else()
|
|||
set(VCPKG_CRT_LINKAGE dynamic)
|
||||
set(VCPKG_LIBRARY_LINKAGE static)
|
||||
endif()
|
||||
|
||||
if(PORT MATCHES "gtest")
|
||||
set(VCPKG_CXX_FLAGS "-Zc:wchar_t-")
|
||||
set(VCPKG_C_FLAGS "-Zc:wchar_t-")
|
||||
endif()
|
||||
Binary file not shown.
Binary file not shown.
|
|
@ -0,0 +1,34 @@
|
|||
From 664b53d5c4920e66e4a57c7515ccfd1bd1477bac Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Filipe=20La=C3=ADns?= <lains@riseup.net>
|
||||
Date: Wed, 2 Apr 2025 03:43:51 +0100
|
||||
Subject: [PATCH] build: add -D_POSIX_C_SOURCE=200809L
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Signed-off-by: Filipe Laíns <lains@riseup.net>
|
||||
---
|
||||
meson.build | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/meson.build b/meson.build
|
||||
index 810a6fa9948217a9b7ac5731057a27fd2a6cf95a..3b88c75eabccf8d8ef9e44e6f36440806ad012cb 100644
|
||||
--- a/meson.build
|
||||
+++ b/meson.build
|
||||
@@ -10,6 +10,7 @@ cc = meson.get_compiler('c')
|
||||
add_project_arguments(
|
||||
'-D_BSD_SOURCE',
|
||||
'-D_DEFAULT_SOURCE',
|
||||
+ '-D_POSIX_C_SOURCE=200809L',
|
||||
cc.get_supported_arguments(
|
||||
'-Wimplicit-function-declaration',
|
||||
'-Wmisleading-indentation',
|
||||
@@ -31,7 +32,7 @@ check_functions = [
|
||||
|
||||
foreach f : check_functions
|
||||
name = f[0].to_upper().underscorify()
|
||||
- if cc.has_function(f[0], prefix : '#define _BSD_SOURCE\n#define _DEFAULT_SOURCE\n#include <@0@>'.format(f[1])) and cc.has_header_symbol(f[1], f[0], prefix : '#define _BSD_SOURCE\n#define _DEFAULT_SOURCE')
|
||||
+ if cc.has_function(f[0], prefix : '#define _BSD_SOURCE\n#define _DEFAULT_SOURCE\n#define _POSIX_C_SOURCE 200809L\n#include <@0@>'.format(f[1])) and cc.has_header_symbol(f[1], f[0], prefix : '#define _BSD_SOURCE\n#define _DEFAULT_SOURCE\n#define _POSIX_C_SOURCE 200809L')
|
||||
cdata.set('HAVE_@0@'.format(name), 1)
|
||||
cdata.set('HAVE_DECL_@0@'.format(name), 1)
|
||||
else
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue