Skip to content

Commit

Permalink
Only from cmake 3.19 is sources supported on interface targets
Browse files Browse the repository at this point in the history
  • Loading branch information
larshg committed Jan 11, 2025
1 parent 515ba04 commit 7e9bbe2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cmake/pcl_targets.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,11 @@ function(PCL_ADD_LIBRARY _name)
endif()

if(NOT ARGS_SOURCES)
add_library(${_name} INTERFACE ${ARGS_INCLUDES})
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.19)
add_library(${_name} INTERFACE ${ARGS_INCLUDES})
else()
add_library(${_name} INTERFACE)
endif()

target_include_directories(${_name} INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
Expand Down

0 comments on commit 7e9bbe2

Please sign in to comment.