So I had code like:
include(ExternalProject)
ExternalProject_Add(
   mockcpp
   DOWNLOAD_COMMAND hg clone ssh://[email protected]/godsme/mockcpp
   CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${MOCKCPP_PREFIX}
   UPDATE_COMMAND hg pull
)

 find_library(MOCKCPP_LIBRARY
                 NAMES
                 mockcpp
                 PATHS
                 ${MOCKCPP_PREFIX}/lib
                 NO_DEFAULT_PATH)

This worked just fine until I used it on a fresh build. Then cmake
wouldn't finish since at cmake-time the library doesn't exist.

So for now I just have switched to manually specify the library name
(${MOCKCPP_PREFIX}/lib/libmockcpp.a). But that's not portable at all,
I need to somehow tap into the platform independent foo inside
find_library. The library in question here is actually using cmake, so
another option would be to somehow use the targets of the external
project, but I didn't see a way to do it (ExternalProject_Get_Property
doesn't seem to be intended for that).

Thanks,
Ian Monroe
--

Powered by www.kitware.com

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

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

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to