Permalink
Browse files

Perl mapping start

  • Loading branch information...
1 parent 8cd526e commit f7a38a565cea2bf926a6f40f13715e0fde9acc28 @pjotrp pjotrp committed Apr 4, 2009
Showing with 44 additions and 0 deletions.
  1. +41 −0 src/mappings/swig/perl/gsl/CMakeLists.txt
  2. +3 −0 src/mappings/swig/perl/gsl/perl_gsl.i
@@ -0,0 +1,41 @@
+cmake_minimum_required(VERSION 2.6)
+
+ENABLE_TESTING()
+
+SET (M_NAME gsl)
+# SET (M_VERSION '')
+SET (INTERFACE perl_${M_NAME}.i)
+
+IF(NOT BUILD_LIBS)
+ SET (CMAKE_MODULE_PATH ../../../../../cmake_modules)
+ENDIF(NOT BUILD_LIBS)
+# SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ascilib)
+
+# SET (USE_INCLUDEPATH io_lib)
+
+# INCLUDE(CMakeBackwardCompatibilityC)
+
+FIND_PACKAGE(ascilibPerl REQUIRED)
+
+ADD_CUSTOM_COMMAND(
+ TARGET ${M_MODULE}
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy ${M_NAME}.pm ascilib/${M_NAME}.pm
+)
+IF(APPLE)
+ ADD_CUSTOM_COMMAND(
+ TARGET ${M_MODULE}
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy ${M_NAME}.so ${M_NAME}.dylib
+ )
+ INSTALL(FILES ${M_MODULE}.dylib DESTINATION ${PERL_LIB_PATH} )
+ENDIF(APPLE)
+
+ADD_TEST(TestPerlGSL ${PERL_EXECUTABLE} -I../${M_NAME}/ascilib ./../test/test_${M_NAME}.pl)
+
+INSTALL(TARGETS ${M_MODULE}
+ LIBRARY DESTINATION ${PERL_SLIB_PATH}
+)
+
+INSTALL(FILES ${M_MODULE}.pm DESTINATION ${PERL_LIB_PATH}/ascilib )
+
@@ -0,0 +1,3 @@
+%module staden_io_lib
+
+%include ../../staden_io_lib.i

0 comments on commit f7a38a5

Please sign in to comment.