diff options
author | stefonzo <stevester.robinson@gmail.com> | 2022-09-05 20:17:22 -0500 |
---|---|---|
committer | stefonzo <stevester.robinson@gmail.com> | 2022-09-05 20:17:22 -0500 |
commit | 7dac325122067bd8b453c0ec60fc1a768bb6f934 (patch) | |
tree | aab7173f2c19eacaf433f443d2fc53e198ce89d7 /3rdparty/libwav/cmake | |
parent | 16431035f8e1c61e37adcceb8eab75e8d0dfed62 (diff) |
adds libwav
Diffstat (limited to '3rdparty/libwav/cmake')
-rw-r--r-- | 3rdparty/libwav/cmake/Modules/wavTargetProperties.cmake | 55 | ||||
-rw-r--r-- | 3rdparty/libwav/cmake/wavConfig.cmake.in | 2 |
2 files changed, 57 insertions, 0 deletions
diff --git a/3rdparty/libwav/cmake/Modules/wavTargetProperties.cmake b/3rdparty/libwav/cmake/Modules/wavTargetProperties.cmake new file mode 100644 index 0000000..21c5657 --- /dev/null +++ b/3rdparty/libwav/cmake/Modules/wavTargetProperties.cmake @@ -0,0 +1,55 @@ +set(wav_compile_features c_std_99) + +set(wav_compile_definitions + __STDC_FORMAT_MACROS + __STDC_LIMIT_MACROS + __STDC_CONSTANT_MACROS + ) + +if(NOT DEFINED wav_c_flags) + set(wav_c_flags "") + include(CheckCCompilerFlag) + if(${CMAKE_C_COMPILER_ID} STREQUAL "MSVC") + elseif(${CMAKE_C_COMPILER_ID} MATCHES "^(GNU|.*Clang)$") + foreach(flag -fno-strict-aliasing + -Wall + -Wcast-align + -Wduplicated-branches + -Wduplicated-cond + -Wextra + -Wformat=2 + -Wmissing-include-dirs + -Wnarrowing + -Wpointer-arith + -Wshadow + -Wuninitialized + -Wwrite-strings + -Wno-multichar + -Wno-format-nonliteral + -Wno-format-truncation + -Werror=discarded-qualifiers + -Werror=ignored-qualifiers + -Werror=implicit + -Werror=implicit-function-declaration + -Werror=implicit-int + -Werror=init-self + -Werror=incompatible-pointer-types + -Werror=int-conversion + -Werror=return-type + -Werror=strict-prototypes + ) + check_c_compiler_flag(${flag} wav_has_c_flag_${flag}) + if(wav_has_c_flag_${flag}) + list(APPEND wav_c_flags ${flag}) + endif() + endforeach() + endif() + set(wav_c_flags ${wav_c_flags} CACHE INTERNAL "C compiler flags") +endif() + +if(${CMAKE_C_COMPILER_ID} STREQUAL "MSVC") +elseif(${CMAKE_C_COMPILER_ID} STREQUAL "GNU") + set(wav_compile_options_release -fomit-frame-pointer -march=native -mtune=native -fvisibility=hidden) +elseif(${CMAKE_C_COMPILER_ID} MATCHES "^.*Clang$") + set(wav_compile_options_release -fomit-frame-pointer -fvisibility=hidden) +endif() diff --git a/3rdparty/libwav/cmake/wavConfig.cmake.in b/3rdparty/libwav/cmake/wavConfig.cmake.in new file mode 100644 index 0000000..d120954 --- /dev/null +++ b/3rdparty/libwav/cmake/wavConfig.cmake.in @@ -0,0 +1,2 @@ +include(CMakeFindDependencyMacro) +include("${CMAKE_CURRENT_LIST_DIR}/wavTargets.cmake") |