Files
CMake/Tests/RunCMake/AndroidMK/AndroidMK.cmake
Marc Chevrier c1f5a44b28 LINK_OPTIONS: Add new family of properties
This family enable to manage link flags

Three new properties:
* directory property: LINK_OPTIONS
* target properties: LINK_OPTIONS and INTERFACE_LINK_OPTIONS

Two new commands
* add_link_options(): to populate directory property
* target_link_options(): to populate target properties

Fixes: #16543
2018-06-06 17:22:39 +02:00

14 lines
477 B
CMake

project(build)
set(CMAKE_BUILD_TYPE Debug)
add_library(foo foo.cxx)
add_library(car foo.cxx)
add_library(bar bar.c)
add_library(dog foo.cxx)
target_link_libraries(foo PRIVATE car bar dog debug -lm)
add_library(foo2 foo.cxx)
target_link_options(foo2 INTERFACE -lm)
export(TARGETS bar dog car foo foo2 ANDROID_MK
${build_BINARY_DIR}/Android.mk)
install(TARGETS bar dog car foo foo2 DESTINATION lib EXPORT myexp)
install(EXPORT_ANDROID_MK myexp DESTINATION share/ndk-modules)