diff options
author | gregory guy <[email protected]> | 2018-12-19 12:15:31 +0100 |
---|---|---|
committer | Slávek Banko <[email protected]> | 2018-12-19 23:25:26 +0100 |
commit | b7d8667d4d574ef78bc2ec6a63fb9b59c6bc0fcd (patch) | |
tree | b0d9449623b6b81deb387ffb1f58fab41590834f | |
parent | 639cb9bec8017e764a3b952757f13283fb1d8039 (diff) | |
download | potracegui-b7d8667d4d574ef78bc2ec6a63fb9b59c6bc0fcd.tar.gz potracegui-b7d8667d4d574ef78bc2ec6a63fb9b59c6bc0fcd.zip |
conversion to the cmake building system
Signed-off-by: gregory guy <[email protected]>
(cherry picked from commit e4a719c080c3d26387a3288815eb20c164c3ed37)
-rw-r--r-- | CMakeL10n.txt | 25 | ||||
-rw-r--r-- | CMakeLists.txt | 77 | ||||
-rw-r--r-- | ConfigureChecks.cmake | 45 | ||||
-rw-r--r-- | config.h.cmake | 8 | ||||
-rw-r--r-- | doc/CMakeLists.txt | 1 | ||||
-rw-r--r-- | doc/en/CMakeLists.txt | 1 | ||||
-rw-r--r-- | doc/man/CMakeLists.txt | 5 | ||||
-rw-r--r-- | doc/man/potracegui.1 | 67 | ||||
-rw-r--r-- | po/CMakeLists.txt | 5 | ||||
-rw-r--r-- | src/CMakeL10n.txt | 1 | ||||
-rw-r--r-- | src/CMakeLists.txt | 50 |
11 files changed, 285 insertions, 0 deletions
diff --git a/CMakeL10n.txt b/CMakeL10n.txt new file mode 100644 index 0000000..9699654 --- /dev/null +++ b/CMakeL10n.txt @@ -0,0 +1,25 @@ +################################################# +# +# (C) 2018 Slávek Banko +# slavek.banko (AT) axis.cz +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +cmake_minimum_required( VERSION 2.8 ) + + + +##### include our cmake modules ################# + +set( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" ) + +include( TDEL10n ) + + +##### create translation templates ############## + +tde_l10n_auto_add_subdirectories( ) diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..7e238db --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,77 @@ +############################################ +# # +# Improvements and feedbacks are welcome # +# # +# This file is released under GPL >= 3 # +# # +############################################ + + +cmake_minimum_required( VERSION 2.8 ) + + +#### general package setup + +project( potracegui ) +set( VERSION R14.1.0 ) + + +#### include essential cmake modules + +include( FindPkgConfig ) +include( CheckFunctionExists ) +include( CheckIncludeFile ) +include( CheckLibraryExists ) +include( CheckCSourceCompiles ) +include( CheckCXXSourceCompiles ) + + +#### include our cmake modules + +set( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" ) +include( TDEMacros ) + + +##### setup install paths + +include( TDESetupPaths ) +tde_setup_paths( ) + + +##### optional stuff + +option( WITH_ALL_OPTIONS "Enable all optional support" OFF ) +option( WITH_GCC_VISIBILITY "Enable fvisibility and fvisibility-inlines-hidden" ${WITH_ALL_OPTIONS} ) + + +##### user requested modules + +option( BUILD_ALL "Build all" ON ) +option( BUILD_DOC "Build documentation" ${BUILD_ALL} ) +option( BUILD_TRANSLATIONS "Build translations" ${BUILD_ALL} ) + + +##### configure checks + +include( ConfigureChecks.cmake ) + + +###### global compiler settings + +add_definitions( -DHAVE_CONFIG_H -UQT_NO_ASCII_CAST ) + +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" ) + + +##### 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 ) diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake new file mode 100644 index 0000000..7733a2a --- /dev/null +++ b/ConfigureChecks.cmake @@ -0,0 +1,45 @@ +########################################### +# # +# Improvements and feedback are welcome # +# # +# This file is released under GPL >= 3 # +# # +########################################### + + +# required stuff +find_package( TQt ) +find_package( TDE ) + +tde_setup_architecture_flags( ) + +include(TestBigEndian) +test_big_endian(WORDS_BIGENDIAN) + + +##### check for gcc visibility support + +if( WITH_GCC_VISIBILITY ) + if( NOT UNIX ) + tde_message_fatal( "gcc visibility support was requested, but your system is not *NIX" ) + endif( NOT UNIX ) + set( __KDE_HAVE_GCC_VISIBILITY 1 ) + set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden -fvisibility-inlines-hidden") + set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden -fvisibility-inlines-hidden") +endif( WITH_GCC_VISIBILITY ) + + +##### gettext + +if( BUILD_TRANSLATIONS ) + include( FindGettext ) + if( GETTEXT_FOUND ) + set( MSGFMT_EXECUTABLE ${GETTEXT_MSGFMT_EXECUTABLE} + CACHE FILEPATH "path to msgfmt executable" ) + endif( GETTEXT_FOUND ) + + if( NOT MSGFMT_EXECUTABLE ) + tde_message_fatal( "msgfmt is required but was not found on your system." ) + endif( NOT MSGFMT_EXECUTABLE ) +endif( BUILD_TRANSLATIONS ) + diff --git a/config.h.cmake b/config.h.cmake new file mode 100644 index 0000000..61ede3a --- /dev/null +++ b/config.h.cmake @@ -0,0 +1,8 @@ +#define VERSION "@VERSION@" + +// Defined if you have fvisibility and fvisibility-inlines-hidden support. +#cmakedefine __KDE_HAVE_GCC_VISIBILITY 1 + +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#cmakedefine WORDS_BIGENDIAN @WORDS_BIGENDIAN@ diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt new file mode 100644 index 0000000..6d0aa9f --- /dev/null +++ b/doc/CMakeLists.txt @@ -0,0 +1 @@ +tde_auto_add_subdirectories( ) diff --git a/doc/en/CMakeLists.txt b/doc/en/CMakeLists.txt new file mode 100644 index 0000000..ba3ef3e --- /dev/null +++ b/doc/en/CMakeLists.txt @@ -0,0 +1 @@ +tde_create_handbook( DESTINATION ${PROJECT_NAME} ) diff --git a/doc/man/CMakeLists.txt b/doc/man/CMakeLists.txt new file mode 100644 index 0000000..8512250 --- /dev/null +++ b/doc/man/CMakeLists.txt @@ -0,0 +1,5 @@ +INSTALL( + FILES ${PROJECT_NAME}.1 + DESTINATION ${MAN_INSTALL_DIR}/man1 + COMPONENT doc +) diff --git a/doc/man/potracegui.1 b/doc/man/potracegui.1 new file mode 100644 index 0000000..989c64e --- /dev/null +++ b/doc/man/potracegui.1 @@ -0,0 +1,67 @@ +.\" Hey, EMACS: -*- nroff -*- +.\" First parameter, NAME, should be all caps +.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection +.\" other parameters are allowed: see man(7), man(1) +.TH POTRACEGUI 1 "January 4, 2005" +.\" Please adjust this date whenever revising the manpage. +.\" +.\" Some roff macros, for reference: +.\" .nh disable hyphenation +.\" .hy enable hyphenation +.\" .ad l left justify +.\" .ad b justify to both left and right margins +.\" .nf disable filling +.\" .fi enable filling +.\" .br insert line break +.\" .sp <n> insert n+1 empty lines +.\" for manpage-specific macros, see man(7) +.SH NAME +potracegui \- a TDE frontend for potrace +.SH SYNOPSIS +.B potracegui +[Qt-options] [TDE-options] [URL] +.br +.SH DESCRIPTION +This manual page documents briefly the +.B potracegui +commands. +This manual page was written for the Debian distribution +because the original program does not have a manual page. +.PP +.\" TeX users may be more comfortable with the \fB<whatever>\fP and +.\" \fI<whatever>\fP escape sequences to invode bold face and italics, +.\" respectively. +\fBpotracegui\fP is a TDE frontend for potrace. +.SH OPTIONS +A summary of options is included below. +.TP +.B \-\-help +Show help about options. +.TP +.B \-\-help-qt +Show QT specific options. +.TP +.B \-\-help-tde +Show TDE specific options. +.TP +.B \-\-help-all +Show all options. +.TP +.B \-\-author +Show author information. +.TP +.B \-v, \-\-version +Show version information. +.TP +.B \-\-license +Show license information. +.TP +.B \-\- +End of options. +.SH SEE ALSO +.BR potrace (1). +.SH AUTHOR +This manual page was written by Christoph Wegscheider +<[email protected]>, for the Debian project (but may be used by +others). The original author of potracegui is Antonio Fasolato diff --git a/po/CMakeLists.txt b/po/CMakeLists.txt new file mode 100644 index 0000000..f943cac --- /dev/null +++ b/po/CMakeLists.txt @@ -0,0 +1,5 @@ +file( GLOB _srcs RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.po ) + +if( _srcs ) + tde_create_translation( LANG auto OUTPUT_NAME ${PROJECT_NAME} ) +endif( ) diff --git a/src/CMakeL10n.txt b/src/CMakeL10n.txt new file mode 100644 index 0000000..4a8b579 --- /dev/null +++ b/src/CMakeL10n.txt @@ -0,0 +1 @@ +tde_l10n_create_template( "potracegui" ) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt new file mode 100644 index 0000000..d3bf61d --- /dev/null +++ b/src/CMakeLists.txt @@ -0,0 +1,50 @@ +include_directories( + ${CMAKE_BINARY_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ${TDE_INCLUDE_DIR} + ${TQT_INCLUDE_DIRS} +) + +link_directories( + ${TQT_LIBRARY_DIRS} + ${TDE_LIB_DIR} +) + + +##### potracegui (executable) + +tde_add_executable( ${PROJECT_NAME} AUTOMOC + + SOURCES + MainWidgetBase.ui + main.cpp + potracegui.cpp + autotraceformats.cpp + mainwidget.cpp + options.cpp + LINK + tdecore-shared + tdeui-shared + tdeio-shared + + DESTINATION ${BIN_INSTALL_DIR} +) + + +##### icons + +tde_install_icons( ${PROJECT_NAME} ) + + +##### other data + +install( + FILES potraceguiui.rc + DESTINATION ${DATA_INSTALL_DIR}/${PROJECT_NAME} +) + +install( + FILES ${PROJECT_NAME}.desktop + DESTINATION ${APPS_INSTALL_DIR}/Graphics +) |