我使用cmake运行swig,用java连接一些c ++库。想知道是否有一个选项来指定swig生成的java输出文件的行结尾?
set(swig_interface "swig/my_swig.i")
set_source_files_properties("${swig_interface}" PROPERTIES CPLUSPLUS ON)
set(jni_output "${SWIG_WRAPPER_OUTPUT}/com/domain/group")
# Hoping theres a flag I can add here which will set the line endings
set(CMAKE_SWIG_FLAGS "-package" "com.domain.group"
"-I${CMAKE_CURRENT_SOURCE_DIR}/include")
set(CMAKE_SWIG_OUTDIR "${jni_output}")
swig_add_module(jni_wrapper java "${swig_interface}" ${lib_src_files})
swig_link_libraries(jni_wrapper other_lib)