Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set VERSION and SOVERSION as additional target properties #2403

Closed
wants to merge 6 commits into from
Closed
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,10 @@ file(GLOB S2N_SRC
add_library(${PROJECT_NAME} ${S2N_HEADERS} ${S2N_SRC})
set_target_properties(${PROJECT_NAME} PROPERTIES LINKER_LANGUAGE C)

# As long as the ABI isn't stable, set the SO version to 0unstable
set_target_properties(${CMAKE_PROJECT_NAME} PROPERTIES VERSION 1.0.0)
Copy link
Contributor

Choose a reason for hiding this comment

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

As s2n is not yet at 1.0, maybe:

set_target_properties(${CMAKE_PROJECT_NAME} PROPERTIES VERSION ${MAJORVER}.${MINORVER})
set_target_properties(${CMAKE_PROJECT_NAME} PROPERTIES SOVERSION ${MAJORVER})

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was basically doing what AWS is using in other projects like aws-c-common or aws-checksums. Both used version 1.0.0 and the SO version unstable0.

But, of course, I can change it anyway you want.

Copy link
Contributor

Choose a reason for hiding this comment

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

What version would you suggest for a project that hasn't had a 1.0.0 release yet? unstable0 for both?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The library version number is that important, so you can choose any value you want. But the SO version should have something that indicates whether the API is stable or not.

set_target_properties(${CMAKE_PROJECT_NAME} PROPERTIES SOVERSION 0unstable)

set(CMAKE_C_FLAGS_DEBUGOPT "")

target_compile_options(${PROJECT_NAME} PRIVATE -pedantic -std=gnu99 -Wall -Wimplicit -Wunused -Wcomment -Wchar-subscripts
Expand Down