Permalink
Browse files

remove deprecation warnings with cmake >= 3.8

  • Loading branch information...
sloriot committed Sep 25, 2017
1 parent 59e2452 commit bda23aa0514424315fc671efaf943ea11125f401
Showing with 15 additions and 3 deletions.
  1. +15 −3 cmake/Modules/SWIG_CGAL_Macros.cmake
@@ -59,7 +59,11 @@ MACRO(ADD_SWIG_CGAL_JAVA_MODULE packagename)
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${JAVALIBPATH})
SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${JAVALIBPATH})
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${JAVALIBPATH})
SWIG_ADD_MODULE(${MODULENAME} java ${INTERFACE_FILES} ${object_files})
if(${CMAKE_VERSION} VERSION_LESS "3.8.0")
SWIG_ADD_MODULE(${MODULENAME} java ${INTERFACE_FILES} ${object_files})
else()
SWIG_ADD_LIBRARY(${MODULENAME} LANGUAGE java SOURCES ${INTERFACE_FILES} ${object_files})
endif()
#link all modules with CGAL_Java_cpp as many if not all need it for the iterators for example
SWIG_LINK_LIBRARIES(${MODULENAME} ${libstolinkwith} CGAL_Java_cpp)
endif()
@@ -89,7 +93,11 @@ MACRO(ADD_SWIG_CGAL_PYTHON_MODULE packagename)
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${PYTHON_OUTDIR_PREFIX}/CGAL")
SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${PYTHON_OUTDIR_PREFIX}/CGAL")
SET(CMAKE_MODULE_OUTPUT_DIRECTORY "${PYTHON_OUTDIR_PREFIX}/CGAL")
SWIG_ADD_MODULE(${MODULENAME} python ${INTERFACE_FILES} ${object_files})
if(${CMAKE_VERSION} VERSION_LESS "3.8.0")
SWIG_ADD_MODULE(${MODULENAME} python ${INTERFACE_FILES} ${object_files})
else()
SWIG_ADD_LIBRARY(${MODULENAME} LANGUAGE python SOURCES ${INTERFACE_FILES} ${object_files})
endif()
SWIG_LINK_LIBRARIES(${MODULENAME} ${libstolinkwith})
if ( LINK_PYTHON_LIBRARY )
swig_link_libraries ( ${MODULENAME} ${PYTHON_LIBRARIES} )
@@ -123,7 +131,11 @@ MACRO(ADD_SWIG_CGAL_RUBY_MODULE packagename)
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${RUBY_OUTDIR_PREFIX}/CGAL")
SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${RUBY_OUTDIR_PREFIX}/CGAL")
SET(CMAKE_MODULE_OUTPUT_DIRECTORY "${RUBY_OUTDIR_PREFIX}/CGAL")
SWIG_ADD_MODULE(${MODULENAME} ruby ${INTERFACE_FILES} ${object_files})
if(${CMAKE_VERSION} VERSION_LESS "3.8.0")
SWIG_ADD_MODULE(${MODULENAME} ruby ${INTERFACE_FILES} ${object_files})
else()
SWIG_ADD_LIBRARY(${MODULENAME} LANGUAGE ruby SOURCES ${INTERFACE_FILES} ${object_files})
endif()
SET_TARGET_PROPERTIES(${SWIG_MODULE_${MODULENAME}_REAL_NAME} PROPERTIES PREFIX "")
SWIG_LINK_LIBRARIES(${MODULENAME} ${libstolinkwith} ${RUBY_LIBRARY})

0 comments on commit bda23aa

Please sign in to comment.