I can install one specific file. When using wildcard in the same command, it complain the file does not exist.
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libproduction_rdict.pcm DESTINATION ${LIBRARY_OUTPUT_PATH})
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/*_rdict.pcm DESTINATION ${LIBRARY_OUTPUT_PATH})
The error message is:
-- Install configuration: ""
CMake Error at Source/cmake_install.cmake:49 (file):
file INSTALL cannot find
"/home/wxie/AI/CUDA/cuda_exmaple/example_2/Build/Source/*_rdict.pcm".
Call Stack (most recent call first):
cmake_install.cmake:42 (include)
As previous answer tells, the cmake_install. cmake contains the commands generated by install command from your CMakeLists. txt . You can execute it by cmake -P cmake_install. cmake and it performs the installation of your project even on windows.
Command flow install(FILES)
requires all files to be listed explicitly.
For install several files by pattern, use install(DIRECTORY)
and its PATTERN option:
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} DESTINATION ${LIBRARY_OUTPUT_PATH}
FILES_MATCHING PATTERN "*_rdict.pcm")
More information about install(DIRECTORY)
and patterns can be found in documentation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With