Skip to content

Commit

Permalink
Fix soname is not empty
Browse files Browse the repository at this point in the history
Affects CMake 3.2 (and later?)

    fatal error: -soname: must take a non-empty argument

Workaround from http://stackoverflow.com/a/32399514/2319028
  • Loading branch information
m-kuhn authored and JDFind committed Aug 27, 2017
1 parent 556cc14 commit 0692e26
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions android.toolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -1506,6 +1506,9 @@ if( DEFINED LIBRARY_OUTPUT_PATH_ROOT
endif()
endif()

# make sure that there is no empty soname used
string(REPLACE "<CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG><TARGET_SONAME>" "" CMAKE_CXX_CREATE_SHARED_MODULE "${CMAKE_CXX_CREATE_SHARED_MODULE}")

# copy shaed stl library to build directory
if( NOT _CMAKE_IN_TRY_COMPILE AND __libstl MATCHES "[.]so$" AND DEFINED LIBRARY_OUTPUT_PATH )
get_filename_component( __libstlname "${__libstl}" NAME )
Expand Down

0 comments on commit 0692e26

Please sign in to comment.