From b0d0fd526b90cbeb125616a9fc32cc332e371abe Mon Sep 17 00:00:00 2001 From: Anton Date: Thu, 5 Jan 2023 00:37:27 +0000 Subject: [PATCH] fix cmake install dirs and public headers --- CMakeLists.txt | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 930fa33..fbab265 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -409,16 +409,13 @@ target_include_directories( ${PROJECT_NAME} PRIVATE target_include_directories( ${PROJECT_NAME} INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/include) +list (APPEND GLOBAL_HEADERS ${EXTRA_FILES}) +set_target_properties(${PROJECT_NAME} PROPERTIES PUBLIC_HEADER "${GLOBAL_HEADERS}") + install(TARGETS ${PROJECT_NAME} ARCHIVE DESTINATION lib LIBRARY DESTINATION lib - RUNTIME DESTINATION bin) + RUNTIME DESTINATION bin + PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/limereport) -install(FILES - ${EXTRA_FILES} - DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}") - -install(FILES - ${GLOBAL_HEADERS} - DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}")