mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-13 15:44:36 +00:00
Initial commit
added libraries: opus flac libsndfile updated: libvorbis libogg openal - Everything works as expected for now. Bare in mind libsndfile needed the check for whether or not it could find the xiph libraries removed in order for this to work.
This commit is contained in:
parent
05a083ca6f
commit
a745fc3757
1954 changed files with 431332 additions and 21037 deletions
39
Engine/lib/opus/cmake/CFeatureCheck.cmake
Normal file
39
Engine/lib/opus/cmake/CFeatureCheck.cmake
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
# - Compile and run code to check for C features
|
||||
#
|
||||
# This functions compiles a source file under the `cmake` folder
|
||||
# and adds the corresponding `HAVE_[FILENAME]` flag to the CMake
|
||||
# environment
|
||||
#
|
||||
# c_feature_check(<FLAG> [<VARIANT>])
|
||||
#
|
||||
# - Example
|
||||
#
|
||||
# include(CFeatureCheck)
|
||||
# c_feature_check(VLA)
|
||||
|
||||
if(__c_feature_check)
|
||||
return()
|
||||
endif()
|
||||
set(__c_feature_check INCLUDED)
|
||||
|
||||
function(c_feature_check FILE)
|
||||
string(TOLOWER ${FILE} FILE)
|
||||
string(TOUPPER ${FILE} VAR)
|
||||
string(TOUPPER "${VAR}_SUPPORTED" FEATURE)
|
||||
if (DEFINED ${VAR}_SUPPORTED)
|
||||
set(${VAR}_SUPPORTED 1 PARENT_SCOPE)
|
||||
return()
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED COMPILE_${FEATURE})
|
||||
message(STATUS "Performing Test ${FEATURE}")
|
||||
try_compile(COMPILE_${FEATURE} ${PROJECT_BINARY_DIR} ${PROJECT_SOURCE_DIR}/cmake/${FILE}.c)
|
||||
endif()
|
||||
|
||||
if(COMPILE_${FEATURE})
|
||||
message(STATUS "Performing Test ${FEATURE} -- success")
|
||||
set(${VAR}_SUPPORTED 1 PARENT_SCOPE)
|
||||
else()
|
||||
message(STATUS "Performing Test ${FEATURE} -- failed to compile")
|
||||
endif()
|
||||
endfunction()
|
||||
Loading…
Add table
Add a link
Reference in a new issue