Skip to content

Commit 044f011

Browse files
committed
Only set Version, Soversion and folder properties after cmake 3.19 where the restrictions of prefixing with INTERFACE_ is removed.
1 parent 3be7aba commit 044f011

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

cmake/pcl_targets.cmake

+8-6
Original file line numberDiff line numberDiff line change
@@ -224,13 +224,15 @@ function(PCL_ADD_LIBRARY _name)
224224
endif()
225225

226226
PCL_ADD_VERSION_INFO(${_name})
227-
228-
set_target_properties(${_name} PROPERTIES
229-
VERSION ${PCL_VERSION}
230-
SOVERSION ${PCL_VERSION_MAJOR}.${PCL_VERSION_MINOR}
231-
DEFINE_SYMBOL "PCLAPI_EXPORTS")
232-
set_target_properties(${_name} PROPERTIES FOLDER "Libraries")
233227

228+
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.19)
229+
set_target_properties(${_name} PROPERTIES
230+
VERSION ${PCL_VERSION}
231+
SOVERSION ${PCL_VERSION_MAJOR}.${PCL_VERSION_MINOR}
232+
DEFINE_SYMBOL "PCLAPI_EXPORTS")
233+
234+
set_target_properties(${_name} PROPERTIES FOLDER "Libraries")
235+
endif()
234236
install(TARGETS ${_name}
235237
EXPORT ${_name}Targets
236238
RUNTIME DESTINATION ${BIN_INSTALL_DIR} COMPONENT pcl_${ARGS_COMPONENT}

0 commit comments

Comments
 (0)