[CMake] Best Practise for Multiple Platforms of External Project
Bo Zhou
bo.schwarzstein at gmail.com
Tue Dec 13 08:29:08 EST 2016
Hi
In my project I have to compile the same external projects by the different
generators, is that possible to handle this cases by ExternalProject_Add ?
I tried this way, firstly, just download the repository
ExternalProject_Add(OPENEXR_DOWNLOAD
PREFIX ${OPENEXR_PREFIX}
GIT_REPOSITORY https://github.com/openexr/openexr.git
GIT_TAG v2.2.0
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND "")
ExternalProject_Get_Property(OPENEXR_DOWNLOAD SOURCE_DIR)
SET(OPENEXR_SOURCE_DIR ${SOURCE_DIR})
Then I tried to create a specific new target to use specific generator
ExternalProject_Add(OPENEXR_VC11
DEPENDS OPENEXR_DOWNLOAD
SOURCE_DIR ${OPENEXR_SOURCE_DIR}/IlmBase)
Seems can't work, it requires an non-empty SOURCE_DIR, but before
downloading, it's empty :(
So is there any better way to do this ? Thanks very much !
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20161213/71c57698/attachment.html>
More information about the CMake
mailing list