Skip to content

Commit

Permalink
build: fix share install path
Browse files Browse the repository at this point in the history
  • Loading branch information
alandefreitas committed Dec 2, 2023
1 parent 42ef191 commit f005291
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -436,13 +436,25 @@ if (MRDOCS_INSTALL)
#-------------------------------------------------
# share
#-------------------------------------------------
file(GLOB SHARE_SUBDIRS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/share ${CMAKE_CURRENT_SOURCE_DIR}/share/*)
file(GLOB SHARE_SUBDIRS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/share/mrdocs ${CMAKE_CURRENT_SOURCE_DIR}/share/mrdocs/*)
foreach (dir ${SHARE_SUBDIRS})
if (NOT IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/share/mrdocs/${dir})
continue()
endif()
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/share/mrdocs/${dir}
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/mrdocs
FILES_MATCHING PATTERN "*")
endforeach()
file(GLOB ROOT_SHARE_SUBDIRS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/share ${CMAKE_CURRENT_SOURCE_DIR}/share/*)
foreach (dir ${ROOT_SHARE_SUBDIRS})
if (dir STREQUAL "mrdocs")
continue()
endif()
if (NOT IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/share/${dir})
continue()
endif()
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/share/${dir}
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/${dir}
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}
FILES_MATCHING PATTERN "*")
endforeach()

Expand Down

0 comments on commit f005291

Please sign in to comment.