Selaa lähdekoodia

Initial conversion to standard CMake system

tags/r14.0.0
Timothy Pearson 8 vuotta sitten
vanhempi
commit
b939a1459e
7 muutettua tiedostoa jossa 190 lisäystä ja 0 poistoa
  1. +76
    -0
      CMakeLists.txt
  2. +30
    -0
      ConfigureChecks.cmake
  3. +6
    -0
      config.h.cmake
  4. +12
    -0
      icons/CMakeLists.txt
  5. +0
    -0
      icons/hi64-app-abakus.png
  6. +17
    -0
      po/CMakeLists.txt
  7. +49
    -0
      src/CMakeLists.txt

+ 76
- 0
CMakeLists.txt Näytä tiedosto

@@ -0,0 +1,76 @@
#################################################
#
# (C) 2011 Timothy Pearson
# kb9vqf (AT) pearsoncomputing.net
#
# Improvements and feedback are welcome
#
# This file is released under GPL >= 2
#
#################################################

cmake_minimum_required( VERSION 2.8 )


##### general package setup #####################

project( abakus )


##### include essential cmake modules ###########

include( CheckCXXSourceCompiles )
include( CheckFunctionExists )
include( CheckIncludeFileCXX )
include( CheckLibraryExists )
include( CheckStructHasMember )
include( CheckSymbolExists )
include( CheckTypeSize )
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( )


##### user requested modules ####################

option( BUILD_ALL "Build all" OFF )
option( BUILD_DOC "Build doc" ${BUILD_ALL} )
option( BUILD_TRANSLATIONS "Build translations" ${BUILD_ALL} )


##### configure checks ##########################

include( ConfigureChecks.cmake )


###### global compiler settings #################

add_definitions(
-DHAVE_CONFIG_H
)

set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TQT_CXX_FLAGS}" )
set( CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined" )
set( CMAKE_MODULE_LINKER_FLAGS "-Wl,--no-undefined" )


##### source directories ########################

add_subdirectory( src )
tde_conditional_add_subdirectory( BUILD_DOC doc )
tde_conditional_add_subdirectory( BUILD_TRANSLATIONS po )


##### write configure files #####################

configure_file( config.h.cmake config.h @ONLY )

+ 30
- 0
ConfigureChecks.cmake Näytä tiedosto

@@ -0,0 +1,30 @@
#################################################
#
# (C) 2011 Timothy Pearson
# kb9vqf (AT) pearsoncomputing.net
#
# Improvements and feedback are welcome
#
# This file is released under GPL >= 2
#
#################################################

if( BUILD_TRANSLATIONS AND NOT DEFINED MSGFMT_EXECUTABLE )
find_program( MSGFMT_EXECUTABLE msgfmt )
if( NOT MSGFMT_EXECUTABLE )
tde_message_fatal( "msgfmt program is required, but was not found on your system" )
endif( )
endif( )

check_type_size( "int" SIZEOF_INT BUILTIN_TYPES_ONLY )
check_type_size( "long" SIZEOF_LONG BUILTIN_TYPES_ONLY )

check_include_file( stdint.h HAVE_STDINT_H )
check_include_file( systems.h HAVE_SYSTEMS_H )
check_include_file( linux/inotify.h HAVE_INOTIFY )

check_function_exists( statvfs HAVE_STATVFS )

# common required stuff
find_package( TQt )
find_package( TDE )

+ 6
- 0
config.h.cmake Näytä tiedosto

@@ -0,0 +1,6 @@
#cmakedefine SIZEOF_INT @SIZEOF_INT@
#cmakedefine SIZEOF_LONG @SIZEOF_LONG@
#cmakedefine HAVE_STDINT_H 1
#cmakedefine HAVE_SYSTEMS_H 1
#cmakedefine HAVE_STATVFS 1
#cmakedefine HAVE_MPFR 1

+ 12
- 0
icons/CMakeLists.txt Näytä tiedosto

@@ -0,0 +1,12 @@
#################################################
#
# (C) 2011 Timothy Pearson
# kb9vqf (AT) pearsoncomputing.net
#
# Improvements and feedback are welcome
#
# This file is released under GPL >= 2
#
#################################################

tde_install_icons( )

src/hi64-app-abakus.png → icons/hi64-app-abakus.png Näytä tiedosto


+ 17
- 0
po/CMakeLists.txt Näytä tiedosto

@@ -0,0 +1,17 @@
#################################################
#
# (C) 2011 Timothy Pearson
# kb9vqf (AT) pearsoncomputing.net
#
# Improvements and feedback are welcome
#
# This file is released under GPL >= 2
#
#################################################

file( GLOB_RECURSE po_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} abakus.po )

foreach( _po ${po_files} )
get_filename_component( _lang ${_po} PATH )
tde_create_translation( FILES ${_po} LANG ${_lang} )
endforeach( )

+ 49
- 0
src/CMakeLists.txt Näytä tiedosto

@@ -0,0 +1,49 @@
#################################################
#
# (C) 2011 Timothy Pearson
# kb9vqf (AT) pearsoncomputing.net
#
# Improvements and feedback are welcome
#
# This file is released under GPL >= 2
#
#################################################

include_directories(
${TQT_INCLUDE_DIRS}
${TDE_INCLUDE_DIR}
${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}/src
${CMAKE_SOURCE_DIR}/src
)

link_directories(
${TQT_LIBRARY_DIRS}
)


##### other data ################################

install( FILES abakus.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} )
install( FILES abakusui.rc DESTINATION ${DATA_INSTALL_DIR} )

##### abakus (executable) #######################

if( HAVE_MPFR )
MPFR_SOURCES="hmath.cpp number.c"
MPFR_LIBRARIES="mpfr gmp"
endif( HAVE_MPFR )

tde_add_executable( abakus AUTOMOC
SOURCES abakus.cpp abakuslistview.cpp
dragsupport.cpp editor.cpp
evaluator.cpp function.cpp
lexer_lex.cpp mainwindow.cpp
node.cpp numerictypes.cpp
parser_yacc.cpp result.cpp
resultlistview.cpp resultlistviewtext.cpp
rpnmuncher.cpp valuemanager.cpp dcopIface.skel
${MPFR_SOURCES}
LINK kio-shared tdecore-shared tdeprint-shared tdeui-shared DCOP-shared ${MPFR_LIBRARIES}
DESTINATION ${BIN_INSTALL_DIR}
)

Loading…
Peruuta
Tallenna