我有CMakeFiles.txt
:
cmake_minimum_required (VERSION 3.1.0)
project (wfractal-test)
include(CTest)
enable_testing()
set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/export/bin)
set (CMAKE_INCLUDE_CURRENT_DIR ON)
find_package (Boost 1.58.0 REQUIRED COMPONENTS unit_test_framework)
include_directories (${CMAKE_SOURCE_DIR}/src ${Boost_INCLUDE_DIRS})
file (GLOB TEST_SOURCES "*.cpp")
add_executable(wfractal-test ${TEST_SOURCES})
target_link_libraries (wfractal-test ${Boost_LIBRARIES})
target_link_libraries(wfractal-test fractal)
add_test (NAME wfractal-test COMMAND wfractal-test)
set_property(TARGET wfractal-test PROPERTY CXX_STANDARD 11)
set_property(TARGET wfractal-test PROPERTY CXX_STANDARD_REQUIRED ON)
我想复制我放置程序的CMAKE_RUNTIME_OUTPUT_DIRECTORY中${Boost_LIBRARIES}
内使用的所有boost库,因为目前我的可执行文件找不到boost_unit_test_framework-vc140-mt-gd-1_60.dll
而我想避免通过手动复制来复制它全名,因为在这种情况下,如果我更改编译器或boost版本,名称会更改,并且因为如果我添加一些其他依赖项,我可以自动复制所有这些,而无需更改代码。
如何在自定义文件夹中复制我使用COMPONENTS
指定的所有增强库?