Update: currently crying uncle ... and switching to ExternalProject_Add. CMake and the third party libs were simply not designed for this.
Question on ExternalProject_Add above: ExternalProject_Add( DOWNLOAD_COMMAND "" CMAKE_ARGS -DMYPROJ_UBERBUILD:BOOL=OFF SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR} ... ) I had in my project: SET( THIRD_PARTY_SRC_DIR 3rdParty/Win ) add_subdirectory( ${THIRD_PARTY_SRC_DIR}/vtk-5.4.2 ./vtk-5.4.2 ) and so I replaced it with: ExternalProject_Add( vtk-5.4.2 DOWNLOAD_COMMAND "" SOURCE_DIR ${THIRD_PARTY_SRC_DIR}/vtk-5.4.2 # SOURCE_DIR C:\projects\NIH2009\source\branches\trunk\source\cpp\lib\3rdParty\Win\vtk-5.4.2 SOURCE_DIR /source/cpp/lib/3rdParty/Win/vtk-5.4.2 ) Where these lines are in a CMakeLists.txt file located at: C:\projects\NIH2009\source\branches\trunk\source\cpp\lib\CMakeLists.txt but I get the error in Visual Studio: 2>CMake Error: The source directory "C:/projects/NIH2009/source/branches/trunk/build/dvip4-Win64/cpp_source/lib/3rdParty/Win/vtk-5.4.2" does not appear to contain CMakeLists.txt. Note the prefixing of C:/projects/NIH2009/source/branches/trunk/build/dvip4-Win64/cpp_source/lib vtk is located at C:\projects\NIH2009\source\branches\trunk\source\cpp\lib\3rdParty\Win\vtk-5.4.2 and project root CMakeLists.txt is at C:\projects\NIH2009\source\branches\trunk ExternalProject_Add( vtk-5.4.2 DOWNLOAD_COMMAND "" SOURCE_DIR /source/cpp/lib/3rdParty/Win/vtk-5.4.2 ) and get: 2>CMake Error: The source directory "/source/cpp/lib/3rdParty/Win/vtk-5.4.2" does not appear to contain CMakeLists.txt. so I try: SOURCE_DIR /3rdParty/Win/vtk-5.4.2 2>CMake Error: The source directory "/3rdParty/Win/vtk-5.4.2" does not appear to contain CMakeLists.txt. so I try absolute path: ExternalProject_Add( vtk-5.4.2 DOWNLOAD_COMMAND "" SOURCE_DIR C:\projects\NIH2009\source\branches\trunk\source\cpp\lib\3rdParty\Win\vtk-5.4.2 } Ahhh the hacking... I am going to find my way out of this forest one day... and onto a desert. And now CMake finds the vtk goop. Now the question: Is there a project relative directory syntax to use here or is ExternalProject not like add_subdirectory in this regard? -- Brian J. Davis
_______________________________________________ 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