diff options
-rw-r--r-- | CMakeL10n.txt | 1 | ||||
-rw-r--r-- | ConfigureChecks.cmake | 21 | ||||
-rw-r--r-- | ksim/monitors/snmp/pdu.cpp | 2 | ||||
-rw-r--r-- | ksim/monitors/snmp/walker.cpp | 2 | ||||
-rw-r--r-- | superkaramba/examples/globalMouse/CMakeLists.txt | 2 |
5 files changed, 22 insertions, 6 deletions
diff --git a/CMakeL10n.txt b/CMakeL10n.txt index 4caef82..3a56a6a 100644 --- a/CMakeL10n.txt +++ b/CMakeL10n.txt @@ -14,7 +14,6 @@ include( TDEVersion ) cmake_minimum_required( VERSION ${TDE_CMAKE_MINIMUM_VERSION} ) -tde_set_project_version( ) ##### include our cmake modules ################# diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index 018df12..d1db8e3 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -201,8 +201,25 @@ endif ( BUILD_KSIM ) if ( BUILD_SUPERKARAMBA ) check_include_file( "sys/types.h" HAVE_SYS_TYPES_H ) - find_package( PythonLibs ) - if( NOT PYTHONLIBS_FOUND OR "${PYTHONLIBS_VERSION_STRING}" LESS "3" ) + if( ${CMAKE_VERSION} VERSION_LESS "3.12" ) + find_package( PythonLibs ) + if( NOT PYTHONLIBS_FOUND ) + tde_message_fatal( "Python is required, but was not found on your system" ) + endif( NOT PYTHONLIBS_FOUND ) + else( ) + find_package( Python COMPONENTS Development ) + if( NOT Python_Development_FOUND ) + tde_message_fatal( "Python is required, but was not found on your system" ) + endif( ) + set( PYTHONLIBS_VERSION_STRING "${Python_VERSION}" ) + set( PYTHON_VERSION_STRING "${Python_VERSION}" ) + set( PYTHON_VERSION_MAJOR "${Python_VERSION_MAJOR}" ) + set( PYTHON_VERSION_MINOR "${Python_VERSION_MINOR}" ) + set( PYTHON_INCLUDE_DIRS "${Python_INCLUDE_DIRS}" ) + set( PYTHON_LIBRARIES "${Python_LIBRARIES}" ) + endif( ) + + if( "${PYTHONLIBS_VERSION_STRING}" LESS "3" ) tde_message_fatal( "Python3 is required, but was not found on your system" ) endif( ) diff --git a/ksim/monitors/snmp/pdu.cpp b/ksim/monitors/snmp/pdu.cpp index e06539a..9ad1110 100644 --- a/ksim/monitors/snmp/pdu.cpp +++ b/ksim/monitors/snmp/pdu.cpp @@ -48,7 +48,7 @@ PDU::~PDU() void PDU::addNullVariables( const IdentifierList &oids ) { std::for_each( oids.begin(), oids.end(), - std::bind1st( std::mem_fun( &PDU::addNullVariable ), this ) ); + std::bind( std::mem_fn( &PDU::addNullVariable ), this, std::placeholders::_1 ) ); } void PDU::addNullVariable( Identifier oid ) diff --git a/ksim/monitors/snmp/walker.cpp b/ksim/monitors/snmp/walker.cpp index 81a36f4..c74097b 100644 --- a/ksim/monitors/snmp/walker.cpp +++ b/ksim/monitors/snmp/walker.cpp @@ -29,7 +29,7 @@ using namespace KSim::Snmp; namespace { template <class T> - struct Deleter : public std::unary_function<T, void> + struct Deleter : public std::function<void(T)> { void operator()( T arg ) { delete arg; } diff --git a/superkaramba/examples/globalMouse/CMakeLists.txt b/superkaramba/examples/globalMouse/CMakeLists.txt index 9df1a76..499a26b 100644 --- a/superkaramba/examples/globalMouse/CMakeLists.txt +++ b/superkaramba/examples/globalMouse/CMakeLists.txt @@ -1,7 +1,7 @@ ##### xcursor.so ####################### include_directories( - ${PYTHON_INCLUDE_DIR} + ${PYTHON_INCLUDE_DIRS} ) tde_add_library( xcursor MODULE NO_LIBTOOL_FILE |