Ok, that being the case I tried it out. There's two things I'm doing
differently than the only example[1] I found:

1. Using install(CODE...) instead of install(SCRIPT...), shouldn't work any
differently, right?
2. The example is from 2009 and uses:

GET_TARGET_PROPERTY(MY_BINARY_LOCATION my_binary LOCATION)

Which I get a policy warning about.

I tried using $<TARGET_FILE:freedv> inside of "get_but apparently I'm not
getting how that's supposed to be used.

Here's the whole code block:
if(WIN32)
install(CODE "
INCLUDE(GetPrerequisites)
GET_PREREQUISITES($<TARGET_FILE:freedv> DEPENDENCIES 1 1 \"\" \"\")
message(\"Checking for dependencies in $<TARGET_FILE:fredv>\")
message(\"Dependencies: ${DEPENDENCIES}\")
FOREACH(DEPENDENCY ${DEPENDENCIES})
   GET_FILENAME_COMPONENT(DEPENDENCY_NAME \"${DEPENDENCY}\" NAME)
   GET_FILENAME_COMPONENT(DEPENDENCY_ACTUAL \"${DEPENDENCY}\" REALPATH)
   message(\"DEPENDENCY_NAME: ${DEPENDENCY_NAME}\")
   message(\"DEPENDENCY_ACTUAL: ${DEPENDENCY_ACTUAL}\")
   FILE(INSTALL
 DESTINATION bin
 TYPE EXECUTABLE
 RENAME \"${DEPENDENCY_NAME}\"
 FILES \"${DEPENDENCY_ACTUAL}\"
 )
ENDFOREACH()
")
endif(WIN32)
--- end ---

Ideas?

Thanks,
Richard

[1] http://www.cmake.org/pipermail/cmake/2009-June/029975.html
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to