From 178f56a57996651a4f8c2a20271f1e2c999279d2 Mon Sep 17 00:00:00 2001 From: Brad King Date: Fri, 19 Sep 2014 10:11:36 -0400 Subject: VS: Fix Tegra-Android platform linking of libraries by name Nsight Tegra Visual Studio Edition handles prefixing of library names with '-l' automatically, so teach the generator not to do so. Reported-by: Mourad Boufarguine --- Modules/Platform/Android.cmake | 6 ++++++ Tests/VSNsightTegra/CMakeLists.txt | 1 + 2 files changed, 7 insertions(+) diff --git a/Modules/Platform/Android.cmake b/Modules/Platform/Android.cmake index e6d4fcf..1bdad04 100644 --- a/Modules/Platform/Android.cmake +++ b/Modules/Platform/Android.cmake @@ -7,3 +7,9 @@ set(CMAKE_PLATFORM_NO_VERSIONED_SONAME 1) # Android reportedly ignores RPATH, and we cannot predict the install # location anyway. set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "") + +# Nsight Tegra Visual Studio Edition takes care of +# prefixing library names with '-l'. +if(CMAKE_VS_PLATFORM_NAME STREQUAL "Tegra-Android") + set(CMAKE_LINK_LIBRARY_FLAG "") +endif() diff --git a/Tests/VSNsightTegra/CMakeLists.txt b/Tests/VSNsightTegra/CMakeLists.txt index e011cac..570733b 100644 --- a/Tests/VSNsightTegra/CMakeLists.txt +++ b/Tests/VSNsightTegra/CMakeLists.txt @@ -36,3 +36,4 @@ add_executable(twolib-second ) target_include_directories(twolib-second PUBLIC jni) target_link_libraries(twolib-second twolib-first) +target_link_libraries(twolib-second m) # test linking to library by name -- cgit v0.12