CMake/Tests/Plugin/check_mod_soname.cmake
Felix Geyer f799ffb5cb Do not set SONAME for MODULE library targets (#15705)
The SONAME field is only useful for shared libraries that application
link against.
2015-08-20 10:45:09 -04:00

8 lines
289 B
CMake

execute_process(COMMAND ${readelf} -d ${mod} OUTPUT_FILE ${mod}.readelf.txt)
file(STRINGS ${mod}.readelf.txt soname REGEX "\\(SONAME\\)")
if(soname)
message(FATAL_ERROR "${mod} has soname but should not:\n ${soname}")
else()
message(STATUS "${mod} has no soname as expected")
endif()