diff options
Diffstat (limited to 'ConfigureChecks.cmake')
-rw-r--r-- | ConfigureChecks.cmake | 39 |
1 files changed, 26 insertions, 13 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index 148884c..d1db8e3 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -28,13 +28,9 @@ if( WITH_GCC_VISIBILITY ) tde_setup_gcc_visibility( ) endif( ) - -##### ark ####################################### - -if( BUILD_ARK ) - check_symbol_exists( strlcpy string.h HAVE_STRLCPY_PROTO ) - check_symbol_exists( strlcat string.h HAVE_STRLCAT_PROTO ) -endif( BUILD_ARK ) +# strlcat and strlcpy check +check_symbol_exists( strlcpy string.h HAVE_STRLCPY_PROTO ) +check_symbol_exists( strlcat string.h HAVE_STRLCAT_PROTO ) ##### kcalc ##################################### @@ -151,9 +147,9 @@ if ( BUILD_KSIM ) check_include_file( "sys/mount.h" HAVE_SYS_MOUNT_H ) check_include_file( "mntent.h" HAVE_MNTENT_H ) check_include_file( "sys/ucred.h" HAVE_SYS_UCRED_H ) - check_include_file( "sys/mnttab.h" HAVE_SYS_MNTTAB_H ) + check_include_files( "stdio.h;sys/mnttab.h" HAVE_SYS_MNTTAB_H ) - check_include_file( "sys/loadavg.h" HAVE_SYS_LOADAVG_H ) + check_include_files( "sys/time.h;sys/loadavg.h" HAVE_SYS_LOADAVG_H ) check_function_exists( getloadavg HAVE_GETLOADAVG ) check_function_exists( statfs HAVE_STATFS ) check_function_exists( statvfs HAVE_STATVFS ) @@ -205,10 +201,27 @@ endif ( BUILD_KSIM ) if ( BUILD_SUPERKARAMBA ) check_include_file( "sys/types.h" HAVE_SYS_TYPES_H ) - find_package( PythonLibs ) - if( NOT PYTHONLIBS_FOUND ) - tde_message_fatal( "python is required, but was not found on your system" ) - endif( NOT PYTHONLIBS_FOUND ) + 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( ) if( WITH_TDENEWSTUFF ) set( HAVE_TDENEWSTUFF 1 ) |