From 07608e92fa4fe8788003886a385b0cbdab715d27 Mon Sep 17 00:00:00 2001 From: vsr Date: Mon, 20 Apr 2020 14:05:07 +0300 Subject: [PATCH] Remove CMake warning (usage of deprecated macro) --- src/FrontTrack_SWIG/CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/FrontTrack_SWIG/CMakeLists.txt b/src/FrontTrack_SWIG/CMakeLists.txt index d42c2b45..bf1e50fc 100644 --- a/src/FrontTrack_SWIG/CMakeLists.txt +++ b/src/FrontTrack_SWIG/CMakeLists.txt @@ -31,7 +31,12 @@ INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR}/../FrontTrack ) -SWIG_ADD_MODULE(FrontTrack python FrontTrack.i) +IF(${CMAKE_VERSION} VERSION_LESS "3.8.0") + SWIG_ADD_MODULE(FrontTrack python FrontTrack.i) +ELSE() + SWIG_ADD_LIBRARY(FrontTrack LANGUAGE python SOURCES FrontTrack.i) +ENDIF() + SWIG_LINK_LIBRARIES(FrontTrack ${PYTHON_LIBRARIES} ${PLATFORM_LIBS} FrontTrack) IF(WIN32) -- 2.39.2