[CMake] [Cmake/SWIG/JAVA/WINDOWS] add "-Wl,--kill-at" flag

Benjamin Ruard ruard at artenum.com
Thu Aug 4 07:30:27 EDT 2011


Hi everybody,
I use CMake to wrap a c++ library in Java with swig. When I use linux OS
it works very well, but when I use windows OS there is a problem.
Indeed, the compilation works fine but the dll has not the correct
method/fonction inside. After several researches on the web I find I
must use the flag "-Wl,--kill-at" when I create the dll. But I do not
find the equivalent flag on cmake, I try:

CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS
CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS
CMAKE_SHARED_LIBRARY_CXX_FLAGS
CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS
CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG
CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG_SEP
CMAKE_SHARED_LIBRARY_LINK_STATIC_CXX_FLAGS
CMAKE_SHARED_LIBRARY_LINK_DYNAMIC_CXX_FLAGS

Does somebody know a solution?

Thanks

Benjamin JEANTY-RUARD



More information about the CMake mailing list