Skip to content

Commit

Permalink
Add SONAME Versioning
Browse files Browse the repository at this point in the history
 - Add SOVERSION to all SOs
  • Loading branch information
damaestro committed May 22, 2024
1 parent 9d8fef7 commit 312dc06
Show file tree
Hide file tree
Showing 15 changed files with 66 additions and 0 deletions.
3 changes: 3 additions & 0 deletions components/pango_core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ elseif(WIN32 OR WIN64)
target_link_libraries(${COMPONENT} PRIVATE shlwapi.lib)
endif()

set_target_properties(
${COMPONENT} PROPERTIES VERSION ${PANGOLIN_VERSION} SOVERSION ${PANGOLIN_VERSION_MAJOR}
)

target_compile_features(${COMPONENT} PUBLIC cxx_decltype_auto )
target_include_directories(${COMPONENT} PUBLIC
Expand Down
4 changes: 4 additions & 0 deletions components/pango_display/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ PRIVATE
${CMAKE_CURRENT_BINARY_DIR}/fonts.cpp
)

set_target_properties(
${COMPONENT} PROPERTIES VERSION ${PANGOLIN_VERSION} SOVERSION ${PANGOLIN_VERSION_MAJOR}
)

target_link_libraries(${COMPONENT} PUBLIC pango_core pango_opengl pango_windowing pango_vars )

target_include_directories(${COMPONENT} PUBLIC
Expand Down
4 changes: 4 additions & 0 deletions components/pango_geometry/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ PRIVATE
${CMAKE_CURRENT_LIST_DIR}/src/geometry_ply.cpp
)

set_target_properties(
${COMPONENT} PROPERTIES VERSION ${PANGOLIN_VERSION} SOVERSION ${PANGOLIN_VERSION_MAJOR}
)

target_link_libraries(${COMPONENT} pango_core pango_image tinyobj Eigen3::Eigen)
target_include_directories(${COMPONENT} PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>
Expand Down
4 changes: 4 additions & 0 deletions components/pango_glgeometry/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ PRIVATE
${CMAKE_CURRENT_LIST_DIR}/src/glgeometry.cpp
)

set_target_properties(
${COMPONENT} PROPERTIES VERSION ${PANGOLIN_VERSION} SOVERSION ${PANGOLIN_VERSION_MAJOR}
)

target_link_libraries(${COMPONENT} pango_geometry pango_opengl)
target_include_directories(${COMPONENT} PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>
Expand Down
4 changes: 4 additions & 0 deletions components/pango_image/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ PRIVATE
${CMAKE_CURRENT_LIST_DIR}/src/image_io_tiff.cpp
)

set_target_properties(
${COMPONENT} PROPERTIES VERSION ${PANGOLIN_VERSION} SOVERSION ${PANGOLIN_VERSION_MAJOR}
)

target_link_libraries(${COMPONENT} PUBLIC pango_core Eigen3::Eigen)
target_include_directories(${COMPONENT} PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>
Expand Down
4 changes: 4 additions & 0 deletions components/pango_opengl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ find_package(Eigen3 REQUIRED NO_MODULE)
message(STATUS "Found Eigen: '${EIGEN3_INCLUDE_DIRS}'")
target_compile_definitions(${COMPONENT} PUBLIC HAVE_EIGEN HAVE_GLEW)

set_target_properties(
${COMPONENT} PROPERTIES VERSION ${PANGOLIN_VERSION} SOVERSION ${PANGOLIN_VERSION_MAJOR}
)

target_link_libraries(${COMPONENT} PUBLIC pango_core pango_image Eigen3::Eigen)
target_include_directories(${COMPONENT} PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>
Expand Down
4 changes: 4 additions & 0 deletions components/pango_packetstream/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ PRIVATE
${CMAKE_CURRENT_LIST_DIR}/src/playback_session.cpp
)

set_target_properties(
${COMPONENT} PROPERTIES VERSION ${PANGOLIN_VERSION} SOVERSION ${PANGOLIN_VERSION_MAJOR}
)

target_compile_definitions(${COMPONENT} PRIVATE "PANGOLIN_VERSION_STRING=\"${PANGOLIN_VERSION}\"")
target_link_libraries(${COMPONENT} PUBLIC pango_core)
target_include_directories(${COMPONENT} PUBLIC
Expand Down
4 changes: 4 additions & 0 deletions components/pango_plot/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ PRIVATE
${CMAKE_CURRENT_LIST_DIR}/src/loaders/csv_table_loader.cpp
)

set_target_properties(
${COMPONENT} PROPERTIES VERSION ${PANGOLIN_VERSION} SOVERSION ${PANGOLIN_VERSION_MAJOR}
)

target_link_libraries(${COMPONENT} pango_display)
target_include_directories(${COMPONENT} PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>
Expand Down
11 changes: 11 additions & 0 deletions components/pango_python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ if(BUILD_PANGOLIN_PYTHON AND Python_FOUND AND pybind11_FOUND)
target_link_libraries(${COMPONENT} PUBLIC
pango_core pango_display pango_plot pango_video pango_vars
)

set_target_properties(
${COMPONENT} PROPERTIES VERSION ${PANGOLIN_VERSION} SOVERSION ${PANGOLIN_VERSION_MAJOR}
)

target_link_libraries(${COMPONENT} PRIVATE pybind11::embed )
target_include_directories(${COMPONENT} PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>
Expand All @@ -73,6 +78,12 @@ if(BUILD_PANGOLIN_PYTHON AND Python_FOUND AND pybind11_FOUND)
$<INSTALL_INTERFACE:include>
)

if (NOT APPLE)
set_target_properties(
pypangolin PROPERTIES VERSION ${PANGOLIN_VERSION} SOVERSION ${PANGOLIN_VERSION_MAJOR}
)
endif()

# To prevent some visibility warnings.
# https://pybind11.readthedocs.io/en/stable/faq.html#someclass-declared-with-greater-visibility-than-the-type-of-its-field-someclass-member-wattributes
set_target_properties(pypangolin PROPERTIES CXX_VISIBILITY_PRESET hidden)
Expand Down
4 changes: 4 additions & 0 deletions components/pango_scene/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ PRIVATE
${CMAKE_CURRENT_LIST_DIR}/src/renderable.cpp
)

set_target_properties(
${COMPONENT} PROPERTIES VERSION ${PANGOLIN_VERSION} SOVERSION ${PANGOLIN_VERSION_MAJOR}
)

target_link_libraries(${COMPONENT} PUBLIC pango_opengl)
target_include_directories(${COMPONENT} PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>
Expand Down
4 changes: 4 additions & 0 deletions components/pango_tools/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ PRIVATE
${CMAKE_CURRENT_LIST_DIR}/src/video_viewer.cpp
)

set_target_properties(
${COMPONENT} PROPERTIES VERSION ${PANGOLIN_VERSION} SOVERSION ${PANGOLIN_VERSION_MAJOR}
)

target_link_libraries(${COMPONENT} PUBLIC pango_display pango_video)
target_include_directories(${COMPONENT} PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>
Expand Down
4 changes: 4 additions & 0 deletions components/pango_vars/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ PRIVATE
${CMAKE_CURRENT_LIST_DIR}/src/varstate.cpp
)

set_target_properties(
${COMPONENT} PROPERTIES VERSION ${PANGOLIN_VERSION} SOVERSION ${PANGOLIN_VERSION_MAJOR}
)

target_link_libraries(${COMPONENT} PUBLIC pango_core)
target_include_directories(${COMPONENT} PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>
Expand Down
4 changes: 4 additions & 0 deletions components/pango_video/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,10 @@ endif()

#########################################################

set_target_properties(
${COMPONENT} PROPERTIES VERSION ${PANGOLIN_VERSION} SOVERSION ${PANGOLIN_VERSION_MAJOR}
)

target_link_libraries(${COMPONENT} PUBLIC pango_core pango_image pango_packetstream)
target_include_directories(${COMPONENT} PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>
Expand Down
3 changes: 3 additions & 0 deletions components/pango_windowing/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ if(OpenGL_EGL_FOUND)
PangolinRegisterFactory(WindowInterface HeadlessWindow)
endif()

set_target_properties(
${COMPONENT} PROPERTIES VERSION ${PANGOLIN_VERSION} SOVERSION ${PANGOLIN_VERSION_MAJOR}
)

target_sources(${COMPONENT} PRIVATE ${CMAKE_CURRENT_LIST_DIR}/src/window.cpp)
target_link_libraries(${COMPONENT} PUBLIC pango_core pango_opengl )
Expand Down
5 changes: 5 additions & 0 deletions components/tinyobj/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
set(COMPONENT tinyobj)

target_sources( ${COMPONENT} PRIVATE "${CMAKE_CURRENT_LIST_DIR}/src/tinyobj.cpp")

set_target_properties(
${COMPONENT} PROPERTIES VERSION ${PANGOLIN_VERSION} SOVERSION ${PANGOLIN_VERSION_MAJOR}
)

set_property(TARGET ${COMPONENT} PROPERTY CXX_STANDARD 11)
target_include_directories(${COMPONENT} PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>
Expand Down

0 comments on commit 312dc06

Please sign in to comment.