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 <mourad@boufarguine.name>
This commit is contained in:
Brad King 2014-09-19 10:11:36 -04:00
parent 7115702f1b
commit 178f56a579
2 changed files with 7 additions and 0 deletions

View File

@ -7,3 +7,9 @@ set(CMAKE_PLATFORM_NO_VERSIONED_SONAME 1)
# Android reportedly ignores RPATH, and we cannot predict the install # Android reportedly ignores RPATH, and we cannot predict the install
# location anyway. # location anyway.
set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "") 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()

View File

@ -36,3 +36,4 @@ add_executable(twolib-second
) )
target_include_directories(twolib-second PUBLIC jni) target_include_directories(twolib-second PUBLIC jni)
target_link_libraries(twolib-second twolib-first) target_link_libraries(twolib-second twolib-first)
target_link_libraries(twolib-second m) # test linking to library by name