File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -148,13 +148,22 @@ function(package_project)
148148 # Installation of package (compatible with vcpkg, etc)
149149 set (_targets_list ${_PackageProject_TARGETS} )
150150 unset (_PackageProject_TARGETS) # to avoid ycm conflict
151+
152+ if (${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.23.0" )
153+ # required in CMake 3.23 and more
154+ set (FILE_SET_ARGS "FILE_SET" "HEADERS" )
155+ endif ()
156+
151157 install (
152158 TARGETS ${_targets_list}
153159 EXPORT ${_PackageProject_EXPORT}
154160 LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR} " COMPONENT shlib
155161 ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR} " COMPONENT lib
156162 RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR} " COMPONENT bin
157- PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR} /${_PackageProject_NAME} " COMPONENT dev)
163+ PUBLIC_HEADER
164+ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR} /${_PackageProject_NAME} "
165+ COMPONENT dev
166+ ${FILE_SET_ARGS} )
158167
159168 # download ForwardArguments
160169 FetchContent_Declare(
You can’t perform that action at this time.
0 commit comments