|
|
|
@ -36,6 +36,7 @@ set(VERSION "${PACKAGE_VERSION}") |
|
|
|
|
|
|
|
option(ENABLE_SHARED "Build shared library." YES) |
|
|
|
option(ENABLE_STATIC "Build static library." YES) |
|
|
|
option(ENABLE_STRICT "Build with strict compile options." YES) |
|
|
|
option(ENABLE_TESTS "Enable compilation of the tests." NO) |
|
|
|
|
|
|
|
include(GNUInstallDirs) |
|
|
|
@ -58,12 +59,15 @@ if(ENABLE_STATIC) |
|
|
|
list(APPEND BCG729_CPPFLAGS "-DBCG729_STATIC") |
|
|
|
endif() |
|
|
|
add_definitions(-DHAVE_CONFIG_H) |
|
|
|
|
|
|
|
if(MSVC) |
|
|
|
add_definitions("/W3") |
|
|
|
else() |
|
|
|
add_definitions("-Wall") |
|
|
|
if (NOT IOS) |
|
|
|
add_definitions("-Werror") |
|
|
|
if(ENABLE_STRICT) |
|
|
|
if (NOT IOS) |
|
|
|
add_definitions(" -Werror -Wextra -Wno-unused-parameter -Wno-missing-field-initializers ") |
|
|
|
endif() |
|
|
|
endif() |
|
|
|
if(NOT ENABLE_TESTS) # test access inner functions so maintain visibility if we want to run tests |
|
|
|
add_definitions("-fvisibility=hidden") |
|
|
|
|