@ -1,13 +1,18 @@
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
#
# #
# ( C ) 2 0 1 0 - 2 0 1 1 S e r g h e i A m e l i a n
# ( C ) 2 0 1 0 - 2 0 1 1 S e r g h e i A m e l i a n #
# serghei ( DOT ) amelian ( AT ) g m a i l . c o m
# serghei ( DOT ) amelian ( AT ) g m a i l . c o m #
#
# #
# I m p r o v e m e n t s a n d f e e d b a c k a r e w e l c o m e
# I m p r o v e m e n t s a n d f e e d b a c k a r e w e l c o m e #
#
# #
# T h i s f i l e i s r e l e a s e d u n d e r G P L > = 2
# T h i s f i l e i s r e l e a s e d u n d e r G P L > = 2 #
#
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
cmake_minimum_required ( VERSION 2.8 )
# # # # g e n e r a l p a c k a g e s e t u p
project ( tqt )
project ( tqt )
@ -17,48 +22,69 @@ set( TQT_MICRO_VERSION 0 )
set ( TQT_VERSION "${TQT_MAJOR_VERSION}.${TQT_MINOR_VERSION}.${TQT_MICRO_VERSION}" )
set ( TQT_VERSION "${TQT_MAJOR_VERSION}.${TQT_MINOR_VERSION}.${TQT_MICRO_VERSION}" )
# # # # # c m a k e s e t u p # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # i n c l u d e e s s e n t i a l c m a k e m o d u l e s
cmake_minimum_required ( VERSION 2.8 )
include ( FindPkgConfig )
include ( CheckFunctionExists )
include ( CheckSymbolExists )
include ( CheckIncludeFile )
include ( CheckLibraryExists )
include ( CheckCSourceCompiles )
include ( CheckCXXSourceCompiles )
include ( CheckCXXSourceCompiles )
include ( GNUInstallDirs OPTIONAL )
include ( GNUInstallDirs OPTIONAL )
# # # # # i n c l u d e o u r c m a k e m o d u l e s # # # # # # # # # # # # # # # # #
# # # # # i n c l u d e o u r c m a k e m o d u l e s
set ( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" )
set ( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" )
include ( TDEMacros )
include ( TDEMacros )
# # # # # i n s t a l l p a t h s s e t u p # # # # # # # # # # # # # # # # # # # # # # #
# # # # # i n s t a l l p a t h s s e t u p
tde_setup_install_path ( EXEC_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}" )
tde_setup_install_path ( EXEC_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}" )
tde_setup_install_path ( BIN_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/bin" )
tde_setup_install_path ( BIN_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/bin" )
if ( CMAKE_INSTALL_LIBDIR )
if ( CMAKE_INSTALL_LIBDIR )
tde_setup_install_path ( LIB_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}" )
tde_setup_install_path ( LIB_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}" )
else ( )
else ( )
tde_setup_install_path ( LIB_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/lib${LIB_SUFFIX}" )
tde_setup_install_path ( LIB_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/lib${LIB_SUFFIX}" )
endif ( )
endif ( )
tde_setup_install_path ( INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include/tqt" )
tde_setup_install_path ( INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include/tqt" )
tde_setup_install_path ( PKGCONFIG_INSTALL_DIR "${LIB_INSTALL_DIR}/pkgconfig" )
tde_setup_install_path ( PKGCONFIG_INSTALL_DIR "${LIB_INSTALL_DIR}/pkgconfig" )
# # # # # o p t i o n a l s t u f f # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # o p t i o n a l s t u f f
option ( WITH_ALL_OPTIONS "Enable all optional support" OFF )
option ( WITH_ALL_OPTIONS "Enable all optional support" OFF )
# # # # # us e r r e q u e s t e d m o d u l e s # # # # # # # # # # # # # # # # # # # #
# # # # # co n f i g u r e c h e c k s
option( BUILD_ALL "Build all" OFF )
include( ConfigureChecks.cmake )
# # # # # c o n f i g u r e c h e c k s # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # g l o b a l c o m p i l e r s e t t i n g s
include ( ConfigureChecks.cmake )
add_definitions ( -DHAVE_CONFIG_H )
set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TQT_CXX_FLAGS}" )
set ( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined" )
set ( CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined" )
# t q t . p c a n d t q t q u i . p c d e f i n i t i o n s
set ( QT_DEFINITIONS "-DTQT_NO_ASCII_CAST -DTQT_NO_STL -DTQT_NO_COMPAT -DTQT_NO_TRANSLATION -DTQT_THREAD_SUPPORT -D_REENTRANT" )
# # # # # t q t i n t e r f a c e s o u r c e s # # # # # # # # # # # # # # # # # # # # # #
# # # # # d i r e c t o r i e s
add_subdirectory ( qtinterface )
add_subdirectory ( qtinterface )
# # # # # w r i t e c o n f i g u r e f i l e s
configure_file ( config.h.cmake config.h @ONLY )