I've found the problem (and provide a solution, however in the tracker some other changes are already being made in UseSWIG.cmake) The problem is that because of relative path, an extra / was inserted. This resulted in that the path to file that was marked as being generated, was not identical to the path to the file that was needed.
Jonatan -----Original Message----- From: Tyler Roscoe [mailto:ty...@cryptio.net] Sent: 24 April 2009 17:28 To: Jonatan Bijl Cc: cmake@cmake.org Subject: Re: [CMake] swig: no rule to make target *** On Fri, Apr 24, 2009 at 10:40:51AM +0200, Jonatan Bijl wrote: > #Generates a swig library. > > function(compile_directory_to_swig DIRECTORY_PATH) > > if(NOT SWIG_FOUND) > > find_package(SWIG REQUIRED) > > include(${SWIG_USE_FILE}) > > set(SWIG_CXX_EXTENSION "cpp") > > set(CMAKE_SWIG_FLAGS "") > > endif(NOT SWIG_FOUND) > > file(GLOB CPP_FILES "${DIRECTORY_PATH}/*.cpp") Don't know anything about SWIG but I have a guess: do those generated .cpp files exist when the above file(GLOB) is run? If not, then CMake won't know about those files and thus can't add them to the list of sources to be compiled, GENERATED flag or not. Also, it is a CMake best practice to use explicit lists rather than file(GLOB) to collect lists of sources. Consult the docs/archives for details. tyler ------------------------------------------------------------- This e-mail is intended exclusively for the addressee. If you are not the addressee you must not read, copy, use or disclose the e-mail nor the content; please notify us immediately [by clicking 'Reply'] and delete this e-mail.
useSwigPatch
Description: useSwigPatch
_______________________________________________ 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