Skip to content

Commit

Permalink
Only set Version, Soversion and folder properties after cmake 3.19 wh…
Browse files Browse the repository at this point in the history
…ere the restrictions of prefixing with INTERFACE_ is removed.
  • Loading branch information
larshg committed Feb 11, 2024
1 parent 3be7aba commit 044f011
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions cmake/pcl_targets.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -224,13 +224,15 @@ function(PCL_ADD_LIBRARY _name)
endif()

PCL_ADD_VERSION_INFO(${_name})

set_target_properties(${_name} PROPERTIES
VERSION ${PCL_VERSION}
SOVERSION ${PCL_VERSION_MAJOR}.${PCL_VERSION_MINOR}
DEFINE_SYMBOL "PCLAPI_EXPORTS")
set_target_properties(${_name} PROPERTIES FOLDER "Libraries")

if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.19)
set_target_properties(${_name} PROPERTIES
VERSION ${PCL_VERSION}
SOVERSION ${PCL_VERSION_MAJOR}.${PCL_VERSION_MINOR}
DEFINE_SYMBOL "PCLAPI_EXPORTS")

set_target_properties(${_name} PROPERTIES FOLDER "Libraries")
endif()
install(TARGETS ${_name}
EXPORT ${_name}Targets
RUNTIME DESTINATION ${BIN_INSTALL_DIR} COMPONENT pcl_${ARGS_COMPONENT}
Expand Down

0 comments on commit 044f011

Please sign in to comment.