summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSander Vrijders <[email protected]>2017-05-18 09:30:37 +0000
committerdimitri staessens <[email protected]>2017-05-18 09:30:37 +0000
commit6b17b5b956f8eadf20c16dadb48273147d922393 (patch)
treec5e9c92c2c12d104ea1cf828ba67467f41264f9b
parent1b3079ce9ad79e9c9b267fde3d09b9c8166ed1e5 (diff)
parenta665a2e0a4651784e2e81eb99a5f414e6a37c384 (diff)
downloadouroboros-6b17b5b956f8eadf20c16dadb48273147d922393.tar.gz
ouroboros-6b17b5b956f8eadf20c16dadb48273147d922393.zip
Merged in sandervrijders/ouroboros/be-swig (pull request #507)
build: Fix deprecation warning
-rw-r--r--include/ouroboros/wrap/CMakeLists.txt12
1 files changed, 11 insertions, 1 deletions
diff --git a/include/ouroboros/wrap/CMakeLists.txt b/include/ouroboros/wrap/CMakeLists.txt
index 6150fb17..405f7157 100644
--- a/include/ouroboros/wrap/CMakeLists.txt
+++ b/include/ouroboros/wrap/CMakeLists.txt
@@ -19,7 +19,17 @@ else ()
# Python assumes C99 since Python 3.6
test_and_set_c_compiler_flag_global(-std=c99)
- swig_add_module(ouroboros python ouroboros.i)
+ # CMake > 3.8 deprecates swig_add_module
+ if (CMAKE_MAKOR_VERSION VERSION_LESS 3 AND
+ CMAKE_MINOR_VERSION VERSION_LESS 8)
+ swig_add_module(ouroboros python ouroboros.i)
+ else ()
+ swig_add_library(ouroboros
+ LANGUAGE python
+ SOURCES ouroboros.i
+ TYPE MODULE)
+ endif()
+
swig_link_libraries(ouroboros ${PYTHON_LIBRARIES} ouroboros)
# Installation directives