Skip to content

Instantly share code, notes, and snippets.

@pamolloy
Last active November 8, 2019 14:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pamolloy/be776738af3d396a3abfc680d700c192 to your computer and use it in GitHub Desktop.
Save pamolloy/be776738af3d396a3abfc680d700c192 to your computer and use it in GitHub Desktop.
FILE(GLOB PUBLIC_HEADERS ../include/*.h)
FILE(GLOB PUBLIC_COMMON_HEADERS ../include/common/*.h)
FILE(GLOB PUBLIC_MESSAGES_HEADERS ../include/messages/*.h)
add_library(foo STATIC ...)
set_property(TARGET foo APPEND PROPERTY PUBLIC_HEADER "${PUBLIC_HEADERS}")
set_property(TARGET foo APPEND PROPERTY PUBLIC_HEADER "${PUBLIC_COMMON_HEADERS}")
set_property(TARGET foo APPEND PROPERTY PUBLIC_HEADER "${PUBLIC_MESSAGES_HEADERS}")
install(TARGETS foo
PUBLIC_HEADER DESTINATION include
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment