Wednesday 15 April 2015

CMake treat file extension as if it were another file extension -


How do I explain CMake that file extension .swig. Am I equal?

How do I do this for other file extensions?

Context

I am using SIMKK (version 2.8, minimum 2.6) with swig. If I set my Swig interface file to keep the .i extension, then everything works automatically (I'm working on a .dll 'module' loading from my target language's interpreter tclsh). If I give it a .swig extension, then the limit does not know what to do with it.

Existing CMake file

At the request of an editor, I want to use an extension on another to use an editor. Commentator, here is Mahindra 'file:

  find_package (swig required) include ($ {SWIG_USE_FILE}) find_package (tcl required) include_directories ($ {TCL_INCLUDE_PATH}) set (CMAKE_SWIG_FLAGS -prefix thoughtjack -namespace) Setting (swg_interface_files native.i) set_source_files_properties (CPLUSPLUS file on $ {swig_interface_files} properties) (GLOB_RECURSE native_source_files * .cpp * .c) swig_add_module (thinkjack_native tcl $ {swig_interface_files} $ { native_source_files}) Swig_link_libraries (thinkjack_native $ {TCL_LIBRARY} oeeg) file (Global Skript_failen $ {CMAKE_CURRENT_SOURCE_DIR} / * Ktisiel) install (fILES $ {script_files} DESTINATION opt / Sotje ) Install (TARGETS Soshjak_netiv Destination opt / Soltajek) add_custom_target (Sochajak Difends Socjak_netiv Source $ $ {Script_files})   

Custom_xyz bit 'source' bit and that is Mkevis with other decorations The solution tells the SIMK to be made available through the file. .. As told, just to change the name of the file from .swig to me (as it has been shown here) to make me a working, loadable, Tcl module that has all the functionality I have to do it per native ( After the source code of the text "itemprop =" lesson ">

after the text

Then you set those files to swig_add_module

  (swig_dot_i_files yo ur.i files.i) swig_add_module (thoughtjack_native tcl $ {swig_dot_i_files})   

Some good qualities this solution: for example, .swig a modification there Will rebuild the target as a dependency from files to i .swig

No comments:

Post a Comment