CMake: Add install target
Do **not** use this with /usr or /usr/local. It creates subdirectories for resources/translations in the install prefix. It's intended for creating a relocatable, self-contained bundle, which can be packaged.
This commit is contained in:
@ -214,4 +214,8 @@ function(add_core_resources target)
|
||||
endif()
|
||||
add_resources(${target} ${path} ${CMAKE_SOURCE_DIR}/data/resources/)
|
||||
endforeach()
|
||||
if(ALLOW_INSTALL)
|
||||
install_imported_dep_library(cpuinfo::cpuinfo)
|
||||
install(DIRECTORY "$<TARGET_FILE_DIR:${target}>/resources" DESTINATION "${CMAKE_INSTALL_PREFIX}")
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
Reference in New Issue
Block a user