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
_______________________________________________
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