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.
tdevelop/CMakeLists.txt

201 lines
6.1 KiB

#################################################
#
# (C) 2010-2011 Serghei Amelian
# serghei (DOT) amelian (AT) gmail.com
#
# Improvements and feedback are welcome
#
# This file is released under GPL >= 2
#
#################################################
cmake_minimum_required( VERSION 2.8 )
##### general package setup #####################
project( tdevelop )
set( VERSION R14.1.0 )
##### include essential cmake modules ###########
include( CheckCSourceCompiles )
include( CheckCXXSourceCompiles )
include( CheckFunctionExists )
include( CheckIncludeFile )
include( CheckIncludeFileCXX )
include( CheckLibraryExists )
include( FindPkgConfig )
##### include our cmake modules #################
set( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" )
include( TDEMacros )
##### setup install paths #######################
include( TDESetupPaths )
tde_setup_paths( )
##### add apidox targets ############
add_custom_target(apidox
COMMAND "./generate_apidox" "${CMAKE_SOURCE_DIR}" "${CMAKE_BINARY_DIR}" "${HTML_INSTALL_DIR}" "/usr/share/tqt3/doc/html"
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/cmake/")
add_custom_target(install-apidox
COMMAND "./install_apidox" "${CMAKE_SOURCE_DIR}" "${CMAKE_BINARY_DIR}" "${HTML_INSTALL_DIR}" "${CMAKE_INSTALL_PREFIX}"
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/cmake/")
##### build tools ###############################
option( WITH_BUILDTOOL_ALL "Enable all build tools" OFF )
option( WITH_BUILDTOOL_ADA "Enable ada build tool" ${WITH_BUILDTOOL_ALL} )
option( WITH_BUILDTOOL_ANT "Enable ant build tool" ${WITH_BUILDTOOL_ALL} )
option( WITH_BUILDTOOL_AUTOTOOLS "Enable autotools build tool" ${WITH_BUILDTOOL_ALL} )
option( WITH_BUILDTOOL_CUSTOMMAKEFILES "Enable custommakefiles build tool" ${WITH_BUILDTOOL_ALL} )
option( WITH_BUILDTOOL_PASCAL "Enable pascal build tool" ${WITH_BUILDTOOL_ALL} )
option( WITH_BUILDTOOL_QMAKE "Enable qmake build tool" ${WITH_BUILDTOOL_ALL} )
option( WITH_BUILDTOOL_SCRIPT "Enable script build tool" ${WITH_BUILDTOOL_ALL} )
##### languages #################################
option( WITH_LANGUAGE_ALL "Enable all languages" OFF )
option( WITH_LANGUAGE_ADA "Enable ada language" ${WITH_LANGUAGE_ALL} )
option( WITH_LANGUAGE_BASH "Enable bash language" ${WITH_LANGUAGE_ALL} )
option( WITH_LANGUAGE_CPP "Enable cpp language" ${WITH_LANGUAGE_ALL} )
option( WITH_LANGUAGE_FORTRAN "Enable fortran language" ${WITH_LANGUAGE_ALL} )
option( WITH_LANGUAGE_JAVA "Enable java language" ${WITH_LANGUAGE_ALL} )
option( WITH_LANGUAGE_CSHARP "Enable csharp language" ${WITH_LANGUAGE_ALL} )
option( WITH_LANGUAGE_PASCAL "Enable pascal language" ${WITH_LANGUAGE_ALL} )
option( WITH_LANGUAGE_PERL "Enable perl language" ${WITH_LANGUAGE_ALL} )
option( WITH_LANGUAGE_PHP "Enable php language" ${WITH_LANGUAGE_ALL} )
option( WITH_LANGUAGE_PYTHON "Enable python language" ${WITH_LANGUAGE_ALL} )
option( WITH_LANGUAGE_RUBY "Enable ruby language" ${WITH_LANGUAGE_ALL} )
option( WITH_LANGUAGE_SQL "Enable sql language" ${WITH_LANGUAGE_ALL} )
##### version control systems ###################
option( WITH_VCS_ALL "Enable all version control systems" OFF )
option( WITH_VCS_CLEARCASE "Enable clearcase support" ${WITH_VCS_ALL} )
option( WITH_VCS_CVSSERVICE "Enable cvsservice support" ${WITH_VCS_ALL} )
option( WITH_VCS_PERFORCE "Enable perforce support" ${WITH_VCS_ALL} )
option( WITH_VCS_SUBVERSION "Enable subversion support" ${WITH_VCS_ALL} )
##### components ################################
option( BUILD_ALL "Build all components" OFF )
option( BUILD_KDEVDESIGNER "Build kdevdesigner" ${BUILD_ALL} )
option( BUILD_VISUALBOYADVANCE "Build embedded/visualboyadvance" ${BUILD_ALL} )
option( BUILD_DOC "Build doc" ${BUILD_ALL} )
##### optional stuff ############################
option( WITH_DEPRECATION "Enable deprecation warnings" OFF )
##### configure checks ##########################
include( ConfigureChecks.cmake )
##### various definitions #######################
if( NOT DEFINED QT_DOCDIR )
find_path( QT_DOCDIR index.html
${TQTDIR}/doc/html
$ENV{TQTDIR}/doc/html )
if( NOT QT_DOCDIR )
set( QT_DOCDIR "QT_DOCDIR is not set" )
endif( )
endif( )
if( NOT DEFINED TDELIBS_DOXYDIR )
set( TDELIBS_DOXYDIR "${TDE_HTML_DIR}/en/tdelibs-apidocs" )
endif( )
if( NOT DEFINED FULL_MAKE_COMMAND )
find_program( FULL_MAKE_COMMAND
NAMES gmake )
if( NOT FULL_MAKE_COMMAND )
find_program( FULL_MAKE_COMMAND
NAMES make )
if( NOT FULL_MAKE_COMMAND )
tde_message_fatal( "Either make or gmake was NOT found." )
endif( NOT FULL_MAKE_COMMAND )
endif( NOT FULL_MAKE_COMMAND )
endif( NOT DEFINED FULL_MAKE_COMMAND )
if( NOT DEFINED MAKE_COMMAND )
GET_FILENAME_COMPONENT( MAKE_COMMAND "${FULL_MAKE_COMMAND}" NAME )
endif( NOT DEFINED MAKE_COMMAND )
###### global compiler settings #################
add_definitions(
-DHAVE_CONFIG_H
${TQT_CFLAGS_OTHER}
)
if( NOT WITH_DEPRECATION )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated" )
endif( )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -include tqt.h" )
set( CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined" )
set( CMAKE_MODULE_LINKER_FLAGS "-Wl,--no-undefined" )
##### install data ##############################
install( FILES
tdevelop.desktop kdevassistant.desktop tdevelop_ruby.desktop
tdevelop_c_cpp.desktop tdevelop_kde_cpp.desktop
tdevelop_scripting.desktop
DESTINATION ${XDG_APPS_INSTALL_DIR} )
install( FILES
tde-development-tdevelop.directory
DESTINATION ${XDG_DIRECTORY_INSTALL_DIR} )
install( FILES
x-tdevelop.desktop
DESTINATION ${MIME_INSTALL_DIR}/application )
install( PROGRAMS
kdevprj2kdevelop
DESTINATION ${BIN_INSTALL_DIR} )
##### source directories ########################
add_subdirectory( lib )
add_subdirectory( src )
add_subdirectory( parts )
add_subdirectory( buildtools )
add_subdirectory( editors )
add_subdirectory( languages )
add_subdirectory( mimetypes )
add_subdirectory( pics )
add_subdirectory( vcs )
add_subdirectory( embedded )
tde_conditional_add_subdirectory( BUILD_KDEVDESIGNER kdevdesigner )
tde_conditional_add_subdirectory( BUILD_DOC doc )
##### write configure files #####################
configure_file( config.h.cmake config.h @ONLY )