The Trinity Qt Interface
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 
 

91 строка
2.4 KiB

  1. ###########################################
  2. # #
  3. # (C) 2010-2011 Serghei Amelian #
  4. # serghei (DOT) amelian (AT) gmail.com #
  5. # #
  6. # Improvements and feedback are welcome #
  7. # #
  8. # This file is released under GPL >= 2 #
  9. # #
  10. ###########################################
  11. cmake_minimum_required( VERSION 2.8 )
  12. #### general package setup
  13. project( tqt )
  14. set( TQT_MAJOR_VERSION 14 )
  15. set( TQT_MINOR_VERSION 0 )
  16. set( TQT_MICRO_VERSION 0 )
  17. set( TQT_VERSION "${TQT_MAJOR_VERSION}.${TQT_MINOR_VERSION}.${TQT_MICRO_VERSION}" )
  18. #### include essential cmake modules
  19. include( FindPkgConfig )
  20. include( CheckFunctionExists )
  21. include( CheckSymbolExists )
  22. include( CheckIncludeFile )
  23. include( CheckLibraryExists )
  24. include( CheckCSourceCompiles )
  25. include( CheckCXXSourceCompiles )
  26. include( GNUInstallDirs OPTIONAL )
  27. ##### include our cmake modules
  28. set( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" )
  29. include( TDEMacros )
  30. ##### install paths setup
  31. tde_setup_install_path( EXEC_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}" )
  32. tde_setup_install_path( BIN_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/bin" )
  33. if( CMAKE_INSTALL_LIBDIR )
  34. tde_setup_install_path( LIB_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}" )
  35. else()
  36. tde_setup_install_path( LIB_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/lib${LIB_SUFFIX}" )
  37. endif()
  38. tde_setup_install_path( INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include/tqt" )
  39. tde_setup_install_path( PKGCONFIG_INSTALL_DIR "${LIB_INSTALL_DIR}/pkgconfig" )
  40. ##### optional stuff
  41. option( WITH_ALL_OPTIONS "Enable all optional support" OFF )
  42. ##### configure checks
  43. include( ConfigureChecks.cmake )
  44. ###### global compiler settings
  45. add_definitions( -DHAVE_CONFIG_H )
  46. set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TQT_CXX_FLAGS}" )
  47. set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined" )
  48. set( CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined" )
  49. # tqt.pc and tqtqui.pc definitions
  50. set( QT_DEFINITIONS "-DTQT_NO_ASCII_CAST -DTQT_NO_STL -DTQT_NO_COMPAT -DTQT_NO_TRANSLATION -DTQT_THREAD_SUPPORT -D_REENTRANT" )
  51. ##### directories
  52. add_subdirectory( qtinterface )
  53. ##### write configure files
  54. configure_file( config.h.cmake config.h @ONLY )