Skip to content

Commit

Permalink
Set the same cmake_minimum_required for all subprojects and add --bui…
Browse files Browse the repository at this point in the history
…ld-id=none flag for linker
  • Loading branch information
sh123 committed Oct 18, 2024
1 parent cc2867e commit 36fce91
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
1 change: 0 additions & 1 deletion libcodec2-android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ android {
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
externalNativeBuild {
cmake {
cppFlags ""
}
}
ndk {
Expand Down
2 changes: 1 addition & 1 deletion libcodec2-android/src/codec2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# Please report questions, comments, problems, or patches to the freetel
# mailing list: https://lists.sourceforge.net/lists/listinfo/freetel-codec2
#
cmake_minimum_required(VERSION 3.13)
cmake_minimum_required(VERSION 3.10)
project(CODEC2
VERSION 1.0.5
DESCRIPTION "Next-Generation Digital Voice for Two-Way Radio"
Expand Down
5 changes: 3 additions & 2 deletions libcodec2-android/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# Sets the minimum version of CMake required to build the native library.

cmake_minimum_required(VERSION 3.4.1)
cmake_minimum_required(VERSION 3.10)
set(main_DIR ${CMAKE_SOURCE_DIR})
add_library(libcodec2 SHARED IMPORTED)
set_target_properties(libcodec2 PROPERTIES IMPORTED_LOCATION
Expand Down Expand Up @@ -38,4 +38,5 @@ find_library( # Sets the name of the path variable.
target_link_libraries(
Codec2JNI
libcodec2
${log-lib})
${log-lib}
"-Wl,--build-id=none")
1 change: 0 additions & 1 deletion libopus-android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ android {
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
externalNativeBuild {
cmake {
cppFlags ""
}
}
ndk {
Expand Down
11 changes: 6 additions & 5 deletions libopus-android/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@

# Sets the minimum version of CMake required to build the native library.

cmake_minimum_required(VERSION 3.4.1)
cmake_minimum_required(VERSION 3.10)
set(main_DIR ${CMAKE_SOURCE_DIR})
add_library(libopus SHARED IMPORTED)
set_target_properties(libopus PROPERTIES IMPORTED_LOCATION
${main_DIR}/../../../build/imported-lib/${ANDROID_ABI}/libopus.so)

include_directories(${main_DIR}/opus/)


# Searches for a specified prebuilt library and stores the path as a
## variable. Because CMake includes system libraries in the search path by
# default, you only need to specify the name of the public NDK library
Expand All @@ -36,6 +35,8 @@ find_library( # Sets the name of the path variable.
# can link multiple libraries, such as libraries you define in this
# build script, prebuilt third-party libraries, or system libraries.
target_link_libraries(
OpusJNI
libopus
${log-lib})
OpusJNI
libopus
${log-lib}
"-Wl,--build-id=none")

2 changes: 1 addition & 1 deletion libopus-android/src/opus/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.1)
cmake_minimum_required(VERSION 3.10)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")

include(OpusPackageVersion)
Expand Down

0 comments on commit 36fce91

Please sign in to comment.