[CMake] How to add swig output file to SRC file list

Subodh Nijsure SNijsure at mocana.com
Tue May 12 21:10:56 EDT 2015


Hello,

I have following cmake file, I am using cmake 3.2

SET_SOURCE_FILES_PROPERTIES(${MYSRC}/myapi.i PROPERTIES CPLUSPLUS ON)
SET_SOURCE_FILES_PROPERTIES(${MYSRC}/myapi.i PROPERTIES SWIG_FLAGS "-ignoremissing")
SWIG_ADD_MODULE(myapi_swig python ${MYSRC}/myapi.i}

set(MYLIBSRC_FILES
    ${MYSRC}/file1.cpp
    ${MYSRC}/file2.cpp
)
add_library(atlas_client ${MYLIBSRC_FILES} )


Now I want to add the cpp file that swig created to list of files that go into my library? Basically what I want to do is include file myapiPYTHON_wrap.cxx that swig generates to MYLIBSRC_FILES

I see that currently by default SWIG ADD MODULE is creating a .so file, which I don’t want to create.

Would appreciate any help/pointers.


-Subodh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20150512/93082ab9/attachment.html>


More information about the CMake mailing list