diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2004-05-03 17:51:06 -0400 |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2004-05-03 17:51:06 -0400 |
commit | b691517eeb9afea2b04f33daf7f6293fd3bd2943 (patch) | |
tree | c7668155d5f3a387406b85be75cc4ac7b7766b9c /Tests/SwigTest | |
parent | baee28ce9bdd996836d1dadd2a51afef402d4347 (diff) | |
download | cmake-b691517eeb9afea2b04f33daf7f6293fd3bd2943.tar.gz |
ENH: Cleanup example a bit
Diffstat (limited to 'Tests/SwigTest')
-rw-r--r-- | Tests/SwigTest/CMakeLists.txt | 84 |
1 files changed, 41 insertions, 43 deletions
diff --git a/Tests/SwigTest/CMakeLists.txt b/Tests/SwigTest/CMakeLists.txt index ba3277bbca..adf955fbe3 100644 --- a/Tests/SwigTest/CMakeLists.txt +++ b/Tests/SwigTest/CMakeLists.txt @@ -1,51 +1,49 @@ -SET(language "tcl") +SET(language "python") PROJECT(example_${language}_class) -FIND_PACKAGE(SWIG) -IF(SWIG_FOUND) - INCLUDE(${SWIG_USE_FILE}) +FIND_PACKAGE(SWIG REQUIRED) +INCLUDE(${SWIG_USE_FILE}) - IF(${language} MATCHES python) - FIND_PACKAGE(PythonLibs) - INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_PATH}) - SET(SWIG_LANG_LIBRARIES ${PYTHON_LIBRARIES}) - ENDIF(${language} MATCHES python) - IF(${language} MATCHES perl) - FIND_PACKAGE(PerlLibs) - INCLUDE_DIRECTORIES(${PERL_INCLUDE_PATH}) - ADD_DEFINITIONS(${PERL_EXTRA_C_FLAGS}) - SET(SWIG_LANG_LIBRARIES ${PERL_LIBRARY}) - ENDIF(${language} MATCHES perl) - IF(${language} MATCHES tcl) - FIND_PACKAGE(TCL) - INCLUDE_DIRECTORIES(${TCL_INCLUDE_PATH}) - SET(SWIG_LANG_LIBRARIES ${TCL_LIBRARY}) - ENDIF(${language} MATCHES tcl) - IF(${language} MATCHES ruby) - FIND_PACKAGE(Ruby) - INCLUDE_DIRECTORIES(${RUBY_INCLUDE_PATH}) - SET(SWIG_LANG_LIBRARIES ${RUBY_LIBRARY}) - ENDIF(${language} MATCHES ruby) - IF(${language} MATCHES php4) - FIND_PACKAGE(PHP4) - INCLUDE_DIRECTORIES(${PHP4_INCLUDE_PATH}) - SET(SWIG_LANG_LIBRARIES ${PHP4_LIBRARY}) - ENDIF(${language} MATCHES php4) - IF(${language} MATCHES pike) - FIND_PACKAGE(Pike) - INCLUDE_DIRECTORIES(${PIKE_INCLUDE_PATH}) - SET(SWIG_LANG_LIBRARIES ${PIKE_LIBRARY}) - ENDIF(${language} MATCHES pike) +IF(${language} MATCHES python) + FIND_PACKAGE(PythonLibs) + INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_PATH}) + SET(SWIG_LANG_LIBRARIES ${PYTHON_LIBRARIES}) +ENDIF(${language} MATCHES python) +IF(${language} MATCHES perl) + FIND_PACKAGE(PerlLibs) + INCLUDE_DIRECTORIES(${PERL_INCLUDE_PATH}) + ADD_DEFINITIONS(${PERL_EXTRA_C_FLAGS}) + SET(SWIG_LANG_LIBRARIES ${PERL_LIBRARY}) +ENDIF(${language} MATCHES perl) +IF(${language} MATCHES tcl) + FIND_PACKAGE(TCL) + INCLUDE_DIRECTORIES(${TCL_INCLUDE_PATH}) + SET(SWIG_LANG_LIBRARIES ${TCL_LIBRARY}) +ENDIF(${language} MATCHES tcl) +IF(${language} MATCHES ruby) + FIND_PACKAGE(Ruby) + INCLUDE_DIRECTORIES(${RUBY_INCLUDE_PATH}) + SET(SWIG_LANG_LIBRARIES ${RUBY_LIBRARY}) +ENDIF(${language} MATCHES ruby) +IF(${language} MATCHES php4) + FIND_PACKAGE(PHP4) + INCLUDE_DIRECTORIES(${PHP4_INCLUDE_PATH}) + SET(SWIG_LANG_LIBRARIES ${PHP4_LIBRARY}) +ENDIF(${language} MATCHES php4) +IF(${language} MATCHES pike) + FIND_PACKAGE(Pike) + INCLUDE_DIRECTORIES(${PIKE_INCLUDE_PATH}) + SET(SWIG_LANG_LIBRARIES ${PIKE_LIBRARY}) +ENDIF(${language} MATCHES pike) - INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) - SET(CMAKE_SWIG_FLAGS "") +SET(CMAKE_SWIG_FLAGS "") - SET_SOURCE_FILES_PROPERTIES(example.i PROPERTIES CPLUSPLUS ON) - SET_SOURCE_FILES_PROPERTIES(example.i PROPERTIES SWIG_FLAGS "-includeall") - SWIG_ADD_MODULE(example "${language}" - example.i example.cxx) - SWIG_LINK_LIBRARIES(example ${SWIG_LANG_LIBRARIES}) -ENDIF(SWIG_FOUND) +SET_SOURCE_FILES_PROPERTIES(example.i PROPERTIES CPLUSPLUS ON) +SET_SOURCE_FILES_PROPERTIES(example.i PROPERTIES SWIG_FLAGS "-includeall") +SWIG_ADD_MODULE(example "${language}" + example.i example.cxx) +SWIG_LINK_LIBRARIES(example ${SWIG_LANG_LIBRARIES}) |