Add headers as PUBLIC_HEADER install target

This commit is contained in:
Alex D. 2020-12-16 15:11:53 +00:00
parent 0d019b02dc
commit daf09dedd3
Signed by: caskd
GPG Key ID: F92BA85F61F4C173
1 changed files with 10 additions and 5 deletions

View File

@ -49,14 +49,19 @@ if ( BUILD_HELPERS )
endif() endif()
add_library(uirc SHARED ${build_FILES}) add_library(uirc SHARED ${build_FILES})
set_property(TARGET uirc PROPERTY C_STANDARD 99)
install(DIRECTORY "${CMAKE_SOURCE_DIR}/include/" include(GNUInstallDirs)
DESTINATION "include/uirc"
FILES_MATCHING PATTERN "*.h" set_target_properties(uirc PROPERTIES
C_STANDARD 99
PUBLIC_HEADER "include/functions.h;include/helpers.h;include/mappings.h;include/types.h;include/uirc.h"
) )
install(TARGETS uirc DESTINATION ${CMAKE_INSTALL_BINDIR}) install(
TARGETS uirc
LIBRARY
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/uirc
)
if ( BUILD_TESTS ) if ( BUILD_TESTS )
message(STATUS "Tests are going to be built.") message(STATUS "Tests are going to be built.")