cmake - How to set the shared library soversion at the build-time? -
this sets version @ cmake-time:
set_target_properties(${this_lib} properties soversion ${project_version}) but use scripts extract info git (is dirty or wrong branch, etc).
for example, can generate version.cpp info @ build-time:
add_custom_command( output ${cmake_current_binary_dir}/version.cpp depends ${git_commit_dirtiness_file} command ${cmake_command} -dsrc=${cmake_current_source_dir}/version.cpp.in -ddst=${cmake_current_binary_dir}/version.cpp -p ${cmake_source_dir}/cmake/configure-file.cmake ) so executable has various information source tree state.
how same kind of operation on soversion, in package lib appear libmy.so.0.0.1.sha.~dirty example?
Comments
Post a Comment