From: Mariusz G. <ali...@gm...> - 2011-03-08 16:11:34
|
Hello, I'm having problems in adding SWIG wrapper generation to cmake project without .i (interface) files. I thought i had it already working but today i changed something and can't get make it work once again. Currently CMakeLists.txt looks like that: <code> FIND_PACKAGE(SWIG REQUIRED) INCLUDE(${SWIG_USE_FILE}) SET_SOURCE_FILES_PROPERTIES(file.h PROPERTIES CPLUSPLUS ON) SET_SOURCE_FILES_PROPERTIES(file.h PROPERTIES SWIG_FLAGS "-d2 -includeall") SET(CMAKE_SWIG_OUTDIR ${CMAKE_CURRENT_BINARY_DIR}) SWIG_ADD_MODULE(example D file.h) SWIG_LINK_LIBRARIES(example ${D2_LIBRARIES}) SET_TARGET_PROPERTIES(example PROPERTIES LINKER_LANGUAGE C) </code> which results in generated libexample.so, but no .d (wrapper side source) files exists. I'm new in cmake and swig, so i bet it's some kind of stupid mistake, but i'm struggling with it too much and simply out of ideas since grepping on CMake folder gives me no /usr/bin/swig anymore. Why it doesn't generate swig binary call, and how is libexample.so generated then - those questions are still opened for me. Thanks for hints, Mariusz Gliwiński |