Skip to content

Commit f92b973

Browse files
committed
piolib: Make piolib a CMake component
By making the library and headers a CMake component, it is possible to install only them and not the examples using: cmake --install . --component piolib Signed-off-by: Phil Elwell <[email protected]>
1 parent b37e400 commit f92b973

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

piolib/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ set(INCLUDE_FILES
2929
"pico/stdlib.h"
3030
)
3131

32-
install(TARGETS pio ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
32+
install(TARGETS pio ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT piolib)
3333
foreach ( file ${INCLUDE_FILES} )
3434
get_filename_component( dir ${file} DIRECTORY )
35-
install( FILES "include/${file}" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/piolib/${dir}" )
35+
install( FILES "include/${file}" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/piolib/${dir}" COMPONENT piolib)
3636
endforeach()

0 commit comments

Comments
 (0)