[CMake] Running tests that depends on third-party DLL

Alexander Lamaison awl03 at doc.ic.ac.uk
Wed Jun 18 15:23:46 EDT 2014


Scott Aron Bloom <scott.bloom at onshorecs.com>
writes:

> I just ran into this exact problem.
>
> For me it was the TCL shared library, the technique I used worked fine
> for windows and linux.
>
> Im not sure about OSX since you are running fixup_bundle..
>
> I also used an ADD_CUSTOM_COMMAND, but I simply did a copy of the
> shared library, and copied it into the ${CMAKE_CURRENT_BINARY_DIR}
>
> ADD_CUSTOM_COMMAND( 
>     TARGET testname
>     POST_BUILD
>     COMMAND ${CMAKE_COMMAND} -E copy ${TCL_SHARED_OPT}
> ${CMAKE_CURRENT_BINARY_DIR}
> )

Sorry for the SLOW reply.

This copy command works but now you still have to know the path
${TCL_SHARED_OPT}.  How do you find it without hardcoding it?  There's
no 'find' function in CMake for runtime binary dependencies.

Alex

-- 
Swish - Easy SFTP for Windows Explorer (http://www.swish-sftp.org)



More information about the CMake mailing list