Skip to content

Commit

Permalink
src/CMakeLists.txt - set VERSION and SOVERSION on the library target
Browse files Browse the repository at this point in the history
The version variables are currently only passed to ecm_setup_version(),
but they need to be also specified as target properties so that CMake
installs versioned .so files on Linux, which is required for proper
distribution packaging.

Signed-off-by: Ondrej Mosnáček <[email protected]>
  • Loading branch information
WOnder93 authored and Allen Winter committed Nov 17, 2023
1 parent 75d9af4 commit 250ab66
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ add_library(
KDAB::kdsingleapplication ALIAS kdsingleapplication
)
set_target_properties(
kdsingleapplication PROPERTIES OUTPUT_NAME "kdsingleapplication${KDSingleApplication_LIBRARY_QTID}"
kdsingleapplication
PROPERTIES VERSION ${${PROJECT_NAME}_VERSION}
SOVERSION ${${PROJECT_NAME}_SOVERSION}
OUTPUT_NAME "kdsingleapplication${${PROJECT_NAME}_LIBRARY_QTID}"
)

target_include_directories(
Expand Down

0 comments on commit 250ab66

Please sign in to comment.