Skip to content

Remove VERSION and SOVERSION target properties, replace "elx" prefix with "elx-", for library files #1416

Merged
N-Dekker merged 2 commits intomainfrom
Remove-VERSION-target-properties
Mar 13, 2026
Merged

Remove VERSION and SOVERSION target properties, replace "elx" prefix with "elx-", for library files #1416
N-Dekker merged 2 commits intomainfrom
Remove-VERSION-target-properties

Conversation

@N-Dekker
Copy link
Copy Markdown
Member

No description provided.

Aims to fix issue #1413 "Avoid creating ".1" library files for ANN, on Linux and MacOS"
Follow-up to pull request #1404 commit 1bf88e2 "ENH: Add relative path to lib directory to RPATH on Linux and MacOS"

Now that the library path is by default relative to the bin, it must not be "overruled" by a path to an old "elx" lib file.
Comment on lines -13 to -14
set_property(TARGET ${tgt} PROPERTY VERSION 1)
set_property(TARGET ${tgt} PROPERTY SOVERSION 1)
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kaspermarstal Do you possibly still remember why you added those VERSION and SOVERSION properties? They bother me, because they produce a ".1" file with each library (on Linux and MacOS). So two library files instead of one, for one library. See also issue #1413

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vboussot Would this proposed change of mine (removal of VERSION and SOVERSION, in order to avoid the extra ".1" files on Linux and MacOS) affect your use case in any way? The IMPACT component is now a "MODULE_LIBRARY", according to CMake, right? Then it looks like VERSION and SOVERSION were also set for the IMPACT plugin:

get_target_property(type ${tgt} TYPE)
if (type STREQUAL "STATIC_LIBRARY" OR
type STREQUAL "MODULE_LIBRARY" OR
type STREQUAL "SHARED_LIBRARY")
set_property(TARGET ${tgt} PROPERTY VERSION 1)
set_property(TARGET ${tgt} PROPERTY SOVERSION 1)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My understanding is that SOVERSION is mainly meant for ABI compatibility handling of shared libraries via the SONAME mechanism, so it might not be very relevant for module targets.
Module libraries are primarily intended to act as runtime-loaded plugins rather than linkable libraries, so this versioning scheme does not seem to have any practical effect here.
It also looks like CMake does not apply the same versioned SONAME behavior to MODULE libraries as it does for SHARED libraries, since on Linux, in the current configuration, I don’t see any versioned artifact such as libImpactMetric.so.1, only a single libImpactMetric.so gets generated.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, thanks Valentin, I'll give it a try!

@N-Dekker N-Dekker marked this pull request as ready for review March 13, 2026 12:57
@N-Dekker N-Dekker merged commit d6affa8 into main Mar 13, 2026
7 of 8 checks passed
@N-Dekker N-Dekker deleted the Remove-VERSION-target-properties branch March 13, 2026 16:05
N-Dekker added a commit to N-Dekker/ITKElastix that referenced this pull request Mar 13, 2026
Upgraded to SuperElastix/elastix@d6affa8

Including:

* ENH: use utf-8 via manifest on Windows by codeling in SuperElastix/elastix#1401
* ENH: Add relative path to lib directory to RPATH on Linux and MacOS in SuperElastix/elastix#1404
* COMP: Replace MersenneTwister Initialize calls in tests with SetSeed in SuperElastix/elastix#1406
* COMP: Use GTest::gtest and GTest::gtest_main targets for ITK > v5.4.5 in SuperElastix/elastix#1408
* Upgrade to Doxygen v1.16.1 in SuperElastix/elastix#1409
* Avoid calling `ImageConstIterator::GetIndex()` iteratively, in transforms and metrics in SuperElastix/elastix#1410
* DOC: Exclude GTesting from Doxygen in SuperElastix/elastix#1411
* ENH: Lazy loading for optional components (IMPACT) by vboussot in SuperElastix/elastix#1396
* Small MainBase style improvements regarding lazy component loading in SuperElastix/elastix#1412
* Reduce `#if` blocks in `MainBase::TryLoadComponentPlugin` in SuperElastix/elastix#1414
* STYLE: Remove deprecated member functions from `elx::ParameterObject` in SuperElastix/elastix#1417
* Remove VERSION and SOVERSION target properties, replace "elx" prefix with "elx-", for library files  in SuperElastix/elastix#1416
N-Dekker added a commit to N-Dekker/ITKElastix that referenced this pull request Mar 16, 2026
Upgraded to SuperElastix/elastix@d6affa8

Including:

* ENH: use utf-8 via manifest on Windows by codeling in SuperElastix/elastix#1401
* ENH: Add relative path to lib directory to RPATH on Linux and MacOS in SuperElastix/elastix#1404
* COMP: Replace MersenneTwister Initialize calls in tests with SetSeed in SuperElastix/elastix#1406
* COMP: Use GTest::gtest and GTest::gtest_main targets for ITK > v5.4.5 in SuperElastix/elastix#1408
* Upgrade to Doxygen v1.16.1 in SuperElastix/elastix#1409
* Avoid calling `ImageConstIterator::GetIndex()` iteratively, in transforms and metrics in SuperElastix/elastix#1410
* DOC: Exclude GTesting from Doxygen in SuperElastix/elastix#1411
* ENH: Lazy loading for optional components (IMPACT) by vboussot in SuperElastix/elastix#1396
* Small MainBase style improvements regarding lazy component loading in SuperElastix/elastix#1412
* Reduce `#if` blocks in `MainBase::TryLoadComponentPlugin` in SuperElastix/elastix#1414
* STYLE: Remove deprecated member functions from `elx::ParameterObject` in SuperElastix/elastix#1417
* Remove VERSION and SOVERSION target properties, replace "elx" prefix with "elx-", for library files  in SuperElastix/elastix#1416
@N-Dekker N-Dekker linked an issue Mar 16, 2026 that may be closed by this pull request
N-Dekker added a commit to N-Dekker/ITKElastix that referenced this pull request Mar 17, 2026
Upgraded to SuperElastix/elastix@ef34ca9

Including:

* ENH: use utf-8 via manifest on Windows by codeling in SuperElastix/elastix#1401
* ENH: Add relative path to lib directory to RPATH on Linux and MacOS in SuperElastix/elastix#1404
* COMP: Replace MersenneTwister Initialize calls in tests with SetSeed in SuperElastix/elastix#1406
* COMP: Use GTest::gtest and GTest::gtest_main targets for ITK > v5.4.5 in SuperElastix/elastix#1408
* Upgrade to Doxygen v1.16.1 in SuperElastix/elastix#1409
* Avoid calling `ImageConstIterator::GetIndex()` iteratively, in transforms and metrics in SuperElastix/elastix#1410
* DOC: Exclude GTesting from Doxygen in SuperElastix/elastix#1411
* ENH: Lazy loading for optional components (IMPACT) by vboussot in SuperElastix/elastix#1396
* Small MainBase style improvements regarding lazy component loading in SuperElastix/elastix#1412
* Reduce `#if` blocks in `MainBase::TryLoadComponentPlugin` in SuperElastix/elastix#1414
* STYLE: Remove deprecated member functions from `elx::ParameterObject` in SuperElastix/elastix#1417
* Remove VERSION and SOVERSION target properties, replace "elx" prefix with "elx-", for library files  in SuperElastix/elastix#1416
* STYLE: Remove redundant `file(MAKE_DIRECTORY ...)` calls from CMakeLists in SuperElastix/elastix#1418
* ENH: Use the full date and time (RFC 2822) in Doxygen generated HTML in SuperElastix/elastix#1419
* ENH: Let ParameterObject throw an exception when index is out of range in SuperElastix/elastix#1420
* ENH: ParameterObject.GetParameter throw when parameter name is not there in SuperElastix/elastix#1422
* ENH: Add Chinese chars to path names Testing/Data and output directory in SuperElastix/elastix#1421
* Add patch version number to library file names,  bump elastix version to 5.3.1 in SuperElastix/elastix#1423
N-Dekker added a commit to N-Dekker/ITKElastix that referenced this pull request Mar 20, 2026
Upgraded to https://github.com/SuperElastix/elastix/releases/tag/5.3.1

Including:

* ENH: use utf-8 via manifest on Windows by codeling in SuperElastix/elastix#1401
* ENH: Add relative path to lib directory to RPATH on Linux and MacOS in SuperElastix/elastix#1404
* Avoid calling `ImageConstIterator::GetIndex()` iteratively, in transforms and metrics in SuperElastix/elastix#1410
* ENH: Lazy loading for optional components (IMPACT) by vboussot in SuperElastix/elastix#1396
* STYLE: Remove deprecated member functions from `elx::ParameterObject` in SuperElastix/elastix#1417
* Remove VERSION and SOVERSION target properties, replace "elx" prefix with "elx-", for library files  in SuperElastix/elastix#1416
* ENH: Let ParameterObject throw an exception when index is out of range in SuperElastix/elastix#1420
* ENH: ParameterObject.GetParameter throw when parameter name is not there in SuperElastix/elastix#1422
* ENH: Add Chinese chars to path names Testing/Data and output directory in SuperElastix/elastix#1421
* Add patch version number to library file names,  bump elastix version to 5.3.1 in SuperElastix/elastix#1423
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Avoid creating ".1" library files for ANN, on Linux and MacOS

2 participants