generate or copy .dll of 3rd-party to executable folder

Hello,
First time at here. I am using CMakeLists.txt to configure my project, a test project only.
Suppose that the project depends on serveral 3rd-party libraries. Every of the libraries is in different directory and was listed to a variable with
LIST(APPEDN LIBRARIES
${3rdParty1_LIBS}) # it could be 3rdParty1, 3rdParty2 or 3 blabla.
Some of them were found with find_package such as OpenCV and some others were only given by an absolute path of .lib files.

By the end of CMakeLists.txt, I use few codes trying to copy or generate .dll to the folder of the executable file. The codes, of course, were from search engine and do not work actually.

target_link_libraries(${PROJECT_NAME} ${LIBRARIES})

add_custom_command ( TARGET ${PROJECT_NAME} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
${LIBRARIES} $<TARGET_FILE_DIR:${PROJECT_NAME}>
)

After having these codes, a few .lib files were generated there but not all. None of .dll file of the libraries was found there as I expected.
I am using 3.12.3 and do not want to use any new characteres of cmake which could make me feel a little complex.

I would recommend using file(GET_RUNTIME_DEPENDENCIES) to find (added in CMake 3.16). If you want to stick to 3.12, there is the GetPrerequisites module which does the same kind of thing, just…not as reliably.