File: android.cmake

package info (click to toggle)
android-platform-tools-base 2.2.2-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 113,928 kB
  • sloc: java: 696,396; xml: 45,920; cpp: 2,526; ansic: 1,432; sh: 508; lisp: 110; javascript: 108; makefile: 17
file content (16 lines) | stat: -rw-r--r-- 907 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
set( CMAKE_SYSTEM_NAME Linux )
set( ANDROID True )

# Set the linker flags
set( CMAKE_EXE_LINKER_FLAGS    "${CMAKE_EXE_LINKER_FLAGS} -pie" )

# Enable link time garbage collection to reduce the binary size
set( CMAKE_CXX_FLAGS           "${CMAKE_CXX_FLAGS} -fdata-sections -ffunction-sections" )
set( CMAKE_EXE_LINKER_FLAGS    "${CMAKE_EXE_LINKER_FLAGS} -Wl,--gc-sections" )
set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--gc-sections" )

# Store the compiler and the linker flags in the cache
set( CMAKE_C_FLAGS             "${CMAKE_C_FLAGS}"             CACHE STRING "C flags" )
set( CMAKE_CXX_FLAGS           "${CMAKE_CXX_FLAGS}"           CACHE STRING "CXX flags" )
set( CMAKE_EXE_LINKER_FLAGS    "${CMAKE_EXE_LINKER_FLAGS}"    CACHE STRING "Exevutable Library linker flags" )
set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}" CACHE STRING "Shared Library linker flags" )