On 15. Jul, 2010, at 18:09 , michael.schm...@l-3com.com wrote: >> Never done it myself, but reading the FAQ and the docs, I'd suggest >> something like this: >> >> find_package(SWIG REQUIRED) >> include(${SWIG_USE_FILE}) >> find_package(PythonLibs REQUIRED) >> include_directories( >> ${CMAKE_CURRENT_SOURCE_DIR} >> ${PYTHON_INCLUDE_DIRS} >> ) >> >> set_source_files_properties(swig_main.i PROPERTIES >> CPLUSPLUS ON >> # SWIG_FLAGS "-includeall" # enable if needed by you >> ) >> >> set(SWIG_MODULE_mylib__EXTRA_DEPS swig_a.i swig_b.i regular.h) >> swig_add_module(mylib python swig_main.i regular.cxx) >> swig_link_libraries(mylib ${PYTHON_LIBRARIES}) >> >> >> I hope this helps getting you started >> >> Michael > > I tried doing exactly what you suggested. When I compile, it can't find > common headers, e.g. "Error: Unable to find 'stdio.h'". If I add > "/usr/include" to the INCLUDE_DIRECTORIES, then it complains about > "Unable to find 'gnu/stubs-32.h'" and "Unable to find 'stddef.h". > > Thanks, > Mike
Did you enable the -includeall option? If so, that might be the problem here. Try removing it, I just copied it from the FAQ. Michael _______________________________________________ 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