Fix resolving resources when running from build directory

* Copy wordlists to build dir share folder
* Change resource path resolution to only test the provided directory, not finding a specific file
This commit is contained in:
Jonathan White
2020-06-04 08:16:47 -04:00
parent c830f85c09
commit 6f5e13815c
5 changed files with 40 additions and 56 deletions

View File

@@ -19,6 +19,9 @@ add_subdirectory(translations)
file(GLOB wordlists_files "wordlists/*.wordlist")
install(FILES ${wordlists_files} DESTINATION ${DATA_INSTALL_DIR}/wordlists)
# Copy wordlists to build dir for use in tests
file(COPY "wordlists" DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
if(UNIX AND NOT APPLE AND NOT HAIKU)
install(DIRECTORY icons/application/ DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor
FILES_MATCHING PATTERN "keepassx*.png" PATTERN "keepassx*.svg"