Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
wysaid committed Dec 9, 2024
1 parent 2d17baa commit 65a774d
Showing 1 changed file with 3 additions and 17 deletions.
20 changes: 3 additions & 17 deletions library/src/main/jni/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,6 @@ endif ()
message("CGE_CORE_HEADER_DIR=${CGE_CORE_HEADER_DIR}")
string(REGEX REPLACE "\n" ";" CGE_CORE_HEADER_DIR ${CGE_CORE_HEADER_DIR})

# execute_process(COMMAND bash -c "find \"${CMAKE_CURRENT_SOURCE_DIR}/cge\" -type f -iname '*.cpp' -o -iname '*.c'" OUTPUT_VARIABLE CGE_CORE_SRC)
# string(REGEX REPLACE "\n" ";" CGE_CORE_SRC ${CGE_CORE_SRC})

file(GLOB_RECURSE CGE_CORE_SRC "${CMAKE_CURRENT_SOURCE_DIR}/cge/*.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/cge/*.c"
"${CMAKE_CURRENT_SOURCE_DIR}/interface/*.cpp")
Expand All @@ -83,14 +80,6 @@ if (CGE_USE_VIDEO_MODULE)

set(CGE_VIDEO_MODULE "ffmpeg")
add_definitions(-DCGE_USE_FFMPEG=1)
# if (DEFINED ANDROID_ABI)
# configure_file(${CMAKE_CURRENT_SOURCE_DIR}/ffmpeg/${ANDROID_ABI}/libffmpeg.so
# ${CMAKE_CURRENT_SOURCE_DIR}/../libs/${ANDROID_ABI}/libffmpeg.so COPYONLY)
# # set_target_properties(ffmpeg PROPERTIES
# # LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../libs/${ANDROID_ABI})
# # set_target_properties(ffmpeg PROPERTIES
# # ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../libs/${ANDROID_ABI})
# endif ()
endif ()

message("CGE_USE_VIDEO_MODULE=${CGE_USE_VIDEO_MODULE}")
Expand All @@ -110,12 +99,9 @@ file(GLOB_RECURSE CGE_EXT_SRC "${CMAKE_CURRENT_SOURCE_DIR}/custom/*.cpp")

add_library(CGEExt SHARED ${CGE_EXT_SRC})

# if (DEFINED ANDROID_ABI)
# set_target_properties(CGE PROPERTIES
# LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../libs/${ANDROID_ABI})
# set_target_properties(CGEExt PROPERTIES
# LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../libs/${ANDROID_ABI})
# endif ()
# 16KB elf: <https://developer.android.com/guide/practices/page-sizes?hl=zh-cn#cmake>
target_link_options(CGE PUBLIC -fPIE -fPIC -pie -Wl,-z,relro,-z,now -Wl,-z,max-page-size=16384)


target_link_libraries(CGE
${CGE_VIDEO_MODULE}
Expand Down

0 comments on commit 65a774d

Please sign in to comment.