TDE educational programs
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

143 lines
3.6 KiB

  1. ###########################################
  2. # #
  3. # Improvements and feedback are welcome #
  4. # #
  5. # This file is released under GPL >= 3 #
  6. # #
  7. ###########################################
  8. # required stuff
  9. find_package( TQt )
  10. find_package( TDE )
  11. tde_setup_architecture_flags( )
  12. include(TestBigEndian)
  13. test_big_endian(WORDS_BIGENDIAN)
  14. tde_setup_largefiles( )
  15. ##### check for gcc visibility support
  16. if( WITH_GCC_VISIBILITY )
  17. tde_setup_gcc_visibility( )
  18. endif( WITH_GCC_VISIBILITY )
  19. ##### check for Doxygen
  20. if( BUILD_DOC AND BUILD_KIG )
  21. find_program( DOXYGEN_BINARY NAMES doxygen )
  22. if( NOT DOXYGEN_BINARY )
  23. tde_message_fatal( "Doxygen is required to build Kig scripting api documentation, but was not found on your system" )
  24. endif( )
  25. endif( )
  26. ##### check for arts
  27. if( WITH_ARTS )
  28. pkg_search_module( ARTS arts )
  29. if( NOT ARTS_FOUND )
  30. tde_message_fatal( "aRts is requested but was not found on your system" )
  31. endif( NOT ARTS_FOUND )
  32. set( WITHOUT_ARTS false )
  33. endif( WITH_ARTS )
  34. if( NOT WITH_ARTS )
  35. set( WITHOUT_ARTS 1 )
  36. endif( NOT WITH_ARTS )
  37. ##### check for boost
  38. if( BUILD_KBRUCH )
  39. find_package( Boost )
  40. if( NOT Boost_FOUND )
  41. tde_message_fatal( "Boost is required, but was not found on your system" )
  42. endif()
  43. endif( BUILD_KBRUCH )
  44. ##### check for Python
  45. if( BUILD_KIG )
  46. if( ${CMAKE_VERSION} VERSION_LESS "3.12" )
  47. find_package( PythonInterp )
  48. find_package( PythonLibs )
  49. if( NOT PYTHONLIBS_FOUND )
  50. tde_message_fatal( "Python is required, but was not found on your system" )
  51. endif( NOT PYTHONLIBS_FOUND )
  52. else( )
  53. find_package( Python COMPONENTS Interpreter Development )
  54. if( NOT Python_Development_FOUND )
  55. tde_message_fatal( "Python is required, but was not found on your system" )
  56. endif( )
  57. set( PYTHON_VERSION_STRING "${Python_VERSION}" )
  58. set( PYTHON_VERSION_MAJOR "${Python_VERSION_MAJOR}" )
  59. set( PYTHON_VERSION_MINOR "${Python_VERSION_MINOR}" )
  60. set( PYTHON_INCLUDE_DIRS "${Python_INCLUDE_DIRS}" )
  61. set( PYTHON_LIBRARIES "${Python_LIBRARIES}" )
  62. endif( )
  63. if( "${PYTHON_VERSION_STRING}" VERSION_LESS "3.0" )
  64. set( KIG_Python_init "initkig"
  65. CACHE STRING "KIG: Init function for python-boost" )
  66. else( )
  67. set( KIG_Python_init "PyInit_kig"
  68. CACHE STRING "KIG: Init function for python-boost" )
  69. endif( )
  70. endif( BUILD_KIG )
  71. # Check for Python Boost
  72. if( BUILD_KIG AND WITH_KIG_PYTHON_SCRIPTING )
  73. find_package( Boost COMPONENTS python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR} )
  74. if( NOT Boost_FOUND )
  75. find_package( Boost COMPONENTS python${PYTHON_VERSION_MAJOR} )
  76. endif( )
  77. if( NOT Boost_FOUND )
  78. find_package( Boost COMPONENTS python )
  79. endif( )
  80. if( NOT Boost_FOUND )
  81. tde_message_fatal( "Boost Python Library is required, but was not found on your system" )
  82. else()
  83. set( KIG_ENABLE_PYTHON_SCRIPTING 1 )
  84. endif( NOT Boost_FOUND )
  85. if( NOT Boost_PYTHON_LIBRARY AND Boost_PYTHON${PYTHON_VERSION_MAJOR}_LIBRARY )
  86. set( Boost_PYTHON_LIBRARY "${Boost_PYTHON${PYTHON_VERSION_MAJOR}_LIBRARY}" )
  87. endif( )
  88. if( NOT Boost_PYTHON_LIBRARY AND Boost_PYTHON${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}_LIBRARY )
  89. set( Boost_PYTHON_LIBRARY "${Boost_PYTHON${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}_LIBRARY}" )
  90. endif( )
  91. endif( BUILD_KIG AND WITH_KIG_PYTHON_SCRIPTING )
  92. ##### check for headers
  93. check_include_file( stdint.h HAVE_STDINT_H )
  94. ##### check for TIMEZONE_IS_INT
  95. check_cxx_source_compiles("
  96. #include <time.h>
  97. int main()
  98. {
  99. daylight = 0;
  100. timezone = 0;
  101. return 0;
  102. }"
  103. TIMEZONE_IS_INT)