Some cleanup and cosmetics.

Signed-off-by: gregory guy <gregory-tde@laposte.net>
pull/5/head
gregory guy 4 years ago
parent b4978e9740
commit 0683f09c4a
No known key found for this signature in database
GPG Key ID: 2CC84A1CC6823AF8

@ -1,24 +1,25 @@
#################################################
#
# (C) 2016 Alexander Golubev
# fatzer2 (AT) gmail.com
#
# Improvements and feedback are welcome
#
# This file is released under GPL >= 2
#
#################################################
###########################################
# #
# (C) 2016 Alexander Golubev #
# fatzer2 (AT) gmail.com #
# #
# Improvements and feedback are welcome #
# #
# This file is released under GPL >= 2 #
# #
###########################################
cmake_minimum_required( VERSION 2.8 )
##### general package setup #####################
##### general package setup
project( tdegames )
set( VERSION R14.1.0 )
##### include essential cmake modules ###########
##### include essential cmake modules
include( FindPkgConfig )
include( CheckIncludeFile )
@ -27,34 +28,36 @@ include( CheckSymbolExists )
include( CheckCXXSourceCompiles )
##### include our cmake modules #################
##### include our cmake modules
set( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" )
include( TDEMacros )
##### setup install paths #######################
##### setup install paths
include( TDESetupPaths )
tde_setup_paths( )
##### optional stuff ############################
##### optional stuff
option( WITH_ALL_OPTIONS "Enable all optional support" OFF )
option( WITH_ARTS "Enable aRts support" ${WITH_ALL_OPTIONS} )
##### options comments ##########################
option( WITH_ARTS "Enable aRts support" ${WITH_ALL_OPTIONS} )
# WITH_ARTS affects kbounce
# if disabled the game will have no sound
# NOTE: ARTS is unconditionally required to build kolf and kasteroids
######################## options comments #############################
# #
# WITH_ARTS affects kbounce if disabled the game will have no sound #
# #
# ARTS is required to build kolf and kasteroids #
# #
#######################################################################
##### user requested modules ####################
option( BUILD_ALL "Build all" OFF )
##### user requested modules
option( BUILD_ALL "Build all" OFF )
option( BUILD_LIBTDEGAMES "Build libtdegames" ${BUILD_ALL} )
option( BUILD_ATLANTIK "Build atlantik" ${BUILD_ALL} )
option( BUILD_DOC "Build documentation" ${BUILD_ALL} )
option( BUILD_KASTEROIDS "Build kasteroids" ${BUILD_ALL} )
@ -86,21 +89,19 @@ option( BUILD_KSOKOBAN "Build ksokoban" ${BUILD_ALL} )
option( BUILD_KSPACEDUEL "Build kspaceduel" ${BUILD_ALL} )
option( BUILD_KTRON "Build ktron" ${BUILD_ALL} )
option( BUILD_KTUBERLING "Build ktuberling" ${BUILD_ALL} )
option( BUILD_LIBTDEGAMES "Build libtdegames" ${BUILD_ALL} )
option( BUILD_LSKAT "Build lskat" ${BUILD_ALL} )
option( BUILD_TWIN4 "Build twin4" ${BUILD_ALL} )
option( BUILD_Q15 "Build q15" ${BUILD_ALL} )
##### configure checks ##########################
##### configure checks
include( ConfigureChecks.cmake )
###### global compiler settings #################
###### global compiler settings
add_definitions(
-DHAVE_CONFIG_H
)
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" )
@ -110,19 +111,23 @@ if( WITH_TEST )
enable_testing()
endif( WITH_TEST )
##### 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 apidox targets
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/")
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/"
)
##### tdegames directories #####################
##### tdegames directories
tde_conditional_add_subdirectory( BUILD_LIBTDEGAMES libtdegames )
tde_conditional_add_subdirectory( BUILD_ATLANTIK atlantik )
tde_conditional_add_subdirectory( BUILD_DOC doc )
tde_conditional_add_subdirectory( BUILD_KASTEROIDS kasteroids )
@ -154,15 +159,15 @@ tde_conditional_add_subdirectory( BUILD_KSOKOBAN ksokoban )
tde_conditional_add_subdirectory( BUILD_KSPACEDUEL kspaceduel )
tde_conditional_add_subdirectory( BUILD_KTRON ktron )
tde_conditional_add_subdirectory( BUILD_KTUBERLING ktuberling )
tde_conditional_add_subdirectory( BUILD_LIBTDEGAMES libtdegames )
tde_conditional_add_subdirectory( BUILD_LSKAT lskat )
tde_conditional_add_subdirectory( BUILD_TWIN4 twin4 )
tde_conditional_add_subdirectory( BUILD_Q15 q15 )
if( BUILD_KSIRTET OR BUILD_KFOULEGGS OR BUILD_KLICKETY )
add_subdirectory( libksirtet )
endif( )
add_subdirectory( libksirtet )
endif()
##### write configure files #####################
##### write configure files
configure_file( config.h.cmake config.h @ONLY )

@ -1,15 +1,17 @@
#################################################
#
# (C) 2016 Alexander Golubev
# fatzer2 (AT) gmail.com
#
# Improvements and feedback are welcome
#
# This file is released under GPL >= 2
#
#################################################
###########################################
# #
# (C) 2016 Alexander Golubev #
# fatzer2 (AT) gmail.com #
# #
# Improvements and feedback are welcome #
# #
# This file is released under GPL >= 2 #
# #
###########################################
# required stuff
find_package( TQt )
find_package( TDE )
tde_setup_architecture_flags( )
@ -18,53 +20,55 @@ test_big_endian(WORDS_BIGENDIAN)
tde_setup_largefiles( )
find_package( TQt )
find_package( TDE )
##### check for gcc visibility support #########
##### check for gcc visibility support
if( WITH_GCC_VISIBILITY )
tde_setup_gcc_visibility( )
endif( )
# arts
if( WITH_ARTS )
pkg_search_module( ARTS arts )
if( ARTS_FOUND )
set( HAVE_ARTS 1 )
else( )
tde_message_fatal( "aRts is requested, but was not found on your system" )
endif( )
else( WITH_ARTS )
if (BUILD_KASTEROIDS OR BUILD_KOLF)
tde_message_fatal( "aRts support is disabled, but it is required to build kasteroids and kolf" )
endif( )
endif( WITH_ARTS )
endif( WITH_GCC_VISIBILITY )
##### Other dependencies ########################
#### check for headers
check_include_file( "stropts.h" HAVE_STROPTS_H )
check_include_file( "sys/filio.h" HAVE_SYS_FILIO_H )
check_include_file( "sys/select.h" HAVE_SYS_SELECT_H )
check_include_file( "sysent.h" HAVE_SYSENT_H )
check_symbol_exists( usleep "unistd.h" HAVE_USLEEP )
check_symbol_exists( usleep "unistd.h" HAVE_USLEEP )
check_symbol_exists( strlcpy "string.h" HAVE_USLEEP )
# NOTE: Borrowed from tdelibs
# FIXME I'm not sure if test TIME_WITH_SYS_TIME are correct
check_include_file( "sys/time.h" HAVE_SYS_TIME_H )
check_include_file( "time.h" HAVE_TIME_H )
check_include_file( "time.h" HAVE_TIME_H )
if( HAVE_SYS_TIME_H AND HAVE_TIME_H )
set( TIME_WITH_SYS_TIME 1 )
endif( HAVE_SYS_TIME_H AND HAVE_TIME_H )
set( TIME_WITH_SYS_TIME 1 )
endif()
# check for arts
if( WITH_ARTS )
pkg_search_module( ARTS arts )
if( ARTS_FOUND )
set( HAVE_ARTS 1 )
else()
tde_message_fatal( "aRts is requested, but was not found on your system" )
endif()
else( WITH_ARTS )
if (BUILD_KASTEROIDS OR BUILD_KOLF)
tde_message_fatal( "aRts support is disabled, but it is required to build kasteroids and kolf" )
endif()
endif( WITH_ARTS )
##### Import libtdegames
##### All these games require libtdegames
##### Import libtdegames ########################
# all games require libtdegames to be imported
if( BUILD_ATLANTIK OR
BUILD_KASTEROIDS OR
BUILD_KATOMIC OR

@ -1,60 +1,2 @@
#################################################
#
# (C) 2010-2011 Serghei Amelian
# serghei (DOT) amelian (AT) gmail.com
#
# Improvements and feedback are welcome
#
# This file is released under GPL >= 2
#
#################################################
project( q15 )
set( TQT_MAJOR_VERSION 14 )
set( TQT_MINOR_VERSION 0 )
set( TQT_MICRO_VERSION 0 )
set( TQT_VERSION "${TQT_MAJOR_VERSION}.${TQT_MINOR_VERSION}.${TQT_MICRO_VERSION}" )
##### cmake setup ###############################
cmake_minimum_required( VERSION 2.8 )
include( CheckCXXSourceCompiles )
include( GNUInstallDirs OPTIONAL )
##### include our cmake modules #################
set( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" )
include( TDEMacros )
include( FindPkgConfig )
##### install paths setup #######################
tde_setup_install_path( EXEC_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}" )
tde_setup_install_path( BIN_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/bin" )
##### optional stuff ############################
option( WITH_ALL_OPTIONS "Enable all optional support" OFF )
##### user requested modules ####################
option( BUILD_ALL "Build all" OFF )
##### configure checks ##########################
include( ConfigureChecks.cmake )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TQT_CXX_FLAGS}" )
##### q15 sources ######################
add_subdirectory( src )

@ -1,47 +0,0 @@
#################################################
#
# (C) 2011 Timothy Pearson
# kb9vqf (AT) pearsoncomputing.net
#
# Improvements and feedback are welcome
#
# This file is released under GPL >= 2
#
#################################################
# required stuff
#tde_setup_architecture_flags( )
#include(TestBigEndian)
#test_big_endian(WORDS_BIGENDIAN)
#tde_setup_largefiles( )
find_package( TQt )
#find_package( TDE )
##### check for gcc visibility support #########
#if( WITH_GCC_VISIBILITY )
# tde_setup_gcc_visibility( )
#endif( )
#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 )

@ -1,19 +0,0 @@
# $Id: Makefile.FreeBSD,v 0.1 2004/08/21 12:11:49 denis Exp $
PROG= q15
BINDIR= /bin
NOMAN= noman
SRCS= main.cpp mainwindow.cpp gameboard.cpp
MOCS= mainwindow.h gameboard.h
CXXFLAGS+= -W -Wall -Werror -I${X11BASE}/include
LDADD+= -L${X11BASE}/lib
run: all
${PROG}
gdb: all
gdb ${PROG}
.include "qt.FreeBSD.mk"
.include <bsd.prog.mk>

@ -1,17 +0,0 @@
#!/bin/bash
top_srcdir=${1}
top_builddir=${2}
kde_libs_htmldir=${3}
export TQTDOCDIR=${4}
if [[ ! -d "${top_srcdir}/doc/common/" ]]; then
export DOXDATA=${kde_libs_htmldir}/en/common
fi
abs_top_srcdir=$(cd ${top_srcdir} && pwd)
rm -rf ${top_builddir}/${kde_libs_htmldir}/en
mkdir -p ${top_builddir}/${kde_libs_htmldir}/en
cd ${top_builddir}/${kde_libs_htmldir}/en
${abs_top_srcdir}/admin/doxygen.sh --modulename --installdir=${top_builddir}/${kde_libs_htmldir}/en ${abs_top_srcdir}

@ -1,12 +0,0 @@
#!/bin/bash
top_srcdir=${1}
top_builddir=${2}
kde_libs_htmldir=${3}
installdir=${DESTDIR}
abs_top_srcdir=$(cd ${top_srcdir} && pwd)
cd ${top_builddir}
mkdir -p ${installdir}/${kde_libs_htmldir}/en
cp -Rp ${top_builddir}/${kde_libs_htmldir}/en ${installdir}/${kde_libs_htmldir}/

@ -1,104 +0,0 @@
#################################################
#
# (C) 2010-2011 Serghei Amelian
# serghei (DOT) amelian (AT) gmail.com
#
# Improvements and feedback are welcome
#
# This file is released under GPL >= 2
#
#################################################
if( NOT TDE_FOUND )
message( STATUS "checking for 'TDE'")
pkg_search_module( TDE tqt )
if( NOT TDE_FOUND )
tde_message_fatal( "Unable to find tdelibs!\n Try adding the directory in which the tdelibs.pc file is located\nto the PKG_CONFIG_PATH variable." )
endif( )
# if the path is not already defined by user,
# find tde-config executable
if( NOT DEFINED KDECONFIG_EXECUTABLE )
find_program( KDECONFIG_EXECUTABLE
NAMES tde-config
HINTS "${TDE_PREFIX}/bin" ${BIN_INSTALL_DIR} )
if( NOT KDECONFIG_EXECUTABLE )
tde_message_fatal( "tde-config are NOT found." )
endif( NOT KDECONFIG_EXECUTABLE )
endif( NOT DEFINED KDECONFIG_EXECUTABLE )
set( ENV{LD_LIBRARY_PATH} "${TDE_LIBDIR}:$ENV{LD_LIBRARY_PATH}" )
# check for installed trinity version
tde_execute_process(
COMMAND ${KDECONFIG_EXECUTABLE} --version
OUTPUT_VARIABLE _version
RESULT_VARIABLE _result
OUTPUT_STRIP_TRAILING_WHITESPACE
MESSAGE "Unable to run tde-config!\n TDELIBS are correctly installed?\n Path to tde-config are corect?" )
# parse tde-config output, to extract TDE version
string( REGEX MATCH "TDE: R([0-9\\.]+).*" __dummy "${_version}" )
set( TDE_VERSION "${CMAKE_MATCH_1}" )
# ask tde-config for few paths
macro( __internal_get_path __type __var )
tde_execute_process(
COMMAND ${KDECONFIG_EXECUTABLE} --expandvars --install ${__type}
OUTPUT_VARIABLE ${__var}
CACHE INTERNAL "TDE ${__type} path" FORCE
OUTPUT_STRIP_TRAILING_WHITESPACE )
endmacro( __internal_get_path )
__internal_get_path( include TDE_INCLUDE_DIR )
__internal_get_path( lib TDE_LIB_DIR )
__internal_get_path( exe TDE_BIN_DIR )
__internal_get_path( data TDE_DATA_DIR )
__internal_get_path( config TDE_CONFIG_DIR )
__internal_get_path( html TDE_HTML_DIR )
__internal_get_path( cmake TDE_CMAKE_DIR )
__internal_get_path( tqtplugins TDE_TQTPLUGINS_DIR )
# find kde tools
macro( __internal_find_program __prog __var )
find_program( ${__var}
NAMES ${__prog}
HINTS "${TDE_PREFIX}/bin" ${BIN_INSTALL_DIR}
OUTPUT_STRIP_TRAILING_WHITESPACE )
if( NOT ${__var} )
tde_message_fatal( "${__prog} is NOT found.\n TDELIBS are correctly installed?" )
endif( NOT ${__var} )
set( ${__var} ${${__var}} CACHE INTERNAL "${__prog} executable" FORCE )
endmacro( __internal_find_program )
__internal_find_program( dcopidl KDE3_DCOPIDL_EXECUTABLE )
__internal_find_program( dcopidlng KDE3_DCOPIDLNG_EXECUTABLE )
__internal_find_program( dcopidl2cpp KDE3_DCOPIDL2CPP_EXECUTABLE )
__internal_find_program( meinproc KDE3_MEINPROC_EXECUTABLE )
__internal_find_program( tdeconfig_compiler KDE3_KCFGC_EXECUTABLE )
__internal_find_program( maketdewidgets KDE3_MAKETDEWIDGETS_EXECUTABLE )
# Don't use __internal_find_program due to it's not mandatory
find_program( TDELFEDITOR_EXECUTABLE NAMES tdelfeditor
HINTS "${TDE_PREFIX}/bin" ${BIN_INSTALL_DIR} OUTPUT_STRIP_TRAILING_WHITESPACE )
# dcopidlng is a bash script which using tde-config;
# if PATH to tde-config is not set, dcopidlng will fail;
# for this reason we set KDECONFIG environment variable before running dcopidlng
set( KDE3_DCOPIDLNG_EXECUTABLE env KDECONFIG=${KDECONFIG_EXECUTABLE} ${KDE3_DCOPIDLNG_EXECUTABLE}
CACHE INTERNAL "dcopidlng executable" FORCE )
# look for SCM data if present
if( EXISTS "${CMAKE_SOURCE_DIR}/.tdescmmodule" )
file( STRINGS "${CMAKE_SOURCE_DIR}/.tdescmmodule" TDE_SCM_MODULE_NAME )
endif( EXISTS "${CMAKE_SOURCE_DIR}/.tdescmmodule" )
if( EXISTS "${CMAKE_SOURCE_DIR}/.tdescmrevision" )
file( STRINGS "${CMAKE_SOURCE_DIR}/.tdescmrevision" TDE_SCM_MODULE_REVISION )
endif( EXISTS "${CMAKE_SOURCE_DIR}/.tdescmrevision" )
message( STATUS " found 'TDE', version ${TDE_VERSION}" )
endif( NOT TDE_FOUND )
include( "${TDE_CMAKE_DIR}/tdelibs.cmake" )

@ -1,107 +0,0 @@
#################################################
#
# (C) 2010-2011 Serghei Amelian
# serghei (DOT) amelian (AT) gmail.com
#
# Improvements and feedback are welcome
#
# This file is released under GPL >= 2
#
#################################################
macro( tqt_message )
message( STATUS "${ARGN}" )
endmacro( )
pkg_search_module( TQT tqt )
if( NOT TQT_FOUND )
tde_message_fatal( "Unable to find tqt!\n Try adding the directory in which the tqt.pc file is located\nto the PKG_CONFIG_PATH variable." )
endif( )
mark_as_advanced(
TMOC_EXECUTABLE
MOC_EXECUTABLE
UIC_EXECUTABLE
)
# tmoc_executable
tde_execute_process(
COMMAND pkg-config tqt --variable=tmoc_executable
OUTPUT_VARIABLE TMOC_EXECUTABLE
CACHE FILEPATH "TQt tmoc executable path"
OUTPUT_STRIP_TRAILING_WHITESPACE )
if( NOT EXISTS ${TMOC_EXECUTABLE} )
tde_message_fatal( "tmoc is not found!\n tqt is correctly installed?" )
endif( )
tqt_message( " tmoc path: ${TMOC_EXECUTABLE}" )
# moc_executable
tde_execute_process(
COMMAND pkg-config tqt --variable=moc_executable
OUTPUT_VARIABLE MOC_EXECUTABLE
CACHE FILEPATH "TQt moc executable path"
OUTPUT_STRIP_TRAILING_WHITESPACE )
if( NOT EXISTS ${MOC_EXECUTABLE} )
tde_message_fatal( "Path to moc is not set.\n tqt is correctly installed?" )
endif( )
tqt_message( " moc path: ${MOC_EXECUTABLE}" )
# uic_executable
tde_execute_process(
COMMAND pkg-config tqt --variable=uic_executable
OUTPUT_VARIABLE UIC_EXECUTABLE
CACHE FILEPATH "TQt uic executable path"
OUTPUT_STRIP_TRAILING_WHITESPACE )
if( NOT EXISTS ${UIC_EXECUTABLE} )
tde_message_fatal( "uic not found!\n tqt is correctly installed?" )
endif( )
tqt_message( " uic path: ${UIC_EXECUTABLE}" )
# tqt-replace script
set( TQT_REPLACE_SCRIPT "${TQT_PREFIX}/bin/tqt-replace" )
if( NOT EXISTS ${TQT_REPLACE_SCRIPT} )
tde_message_fatal( "tqt-replace not found!\n Check tqt installation." )
endif( )
tqt_message( " tqt-replace path: ${TQT_REPLACE_SCRIPT}" )
# check if tqt is usable
tde_save( CMAKE_REQUIRED_INCLUDES CMAKE_REQUIRED_LIBRARIES )
set( CMAKE_REQUIRED_INCLUDES ${TQT_INCLUDE_DIRS} )
foreach( _dirs ${TQT_LIBRARY_DIRS} )
list( APPEND CMAKE_REQUIRED_LIBRARIES "-L${_dirs}" )
endforeach()
list( APPEND CMAKE_REQUIRED_LIBRARIES ${TQT_LIBRARIES} )
check_cxx_source_compiles("
#include <tqapplication.h>
int main(int argc, char **argv) { TQApplication app(argc, argv); return 0; } "
HAVE_USABLE_TQT )
if( NOT HAVE_USABLE_TQT )
tde_message_fatal( "Unable to build a simple tqt test." )
endif( )
tde_restore( CMAKE_REQUIRED_INCLUDES CMAKE_REQUIRED_LIBRARIES )
# TQT_CXX_FLAGS
foreach( _flag ${TQT_CFLAGS} ${TQT_CFLAGS_OTHER} )
set( TQT_CXX_FLAGS "${TQT_CXX_FLAGS} ${_flag}" )
endforeach()
# Set compiler flags according to build type
set( CMAKE_CXX_FLAGS_RELWITHDEBINFO "-DNDEBUG" )
set( CMAKE_C_FLAGS_RELWITHDEBINFO "-DNDEBUG" )

@ -1,45 +0,0 @@
#################################################
#
# (C) 2010-2011 Serghei Amelian
# serghei (DOT) amelian (AT) gmail.com
#
# Improvements and feedback are welcome
#
# This file is released under GPL >= 2
#
#################################################
macro( tqtqui_message )
message( STATUS "${ARGN}" )
endmacro( )
pkg_search_module( TQTQUI tqtqui )
if( NOT TQTQUI_FOUND )
tde_message_fatal( "Unable to find tqtqui!\n Try adding the directory in which the tqtqui.pc file is located\nto the PKG_CONFIG_PATH variable." )
endif( )
# check if tqtqui is usable
tde_save( CMAKE_REQUIRED_INCLUDES CMAKE_REQUIRED_LIBRARIES )
set( CMAKE_REQUIRED_INCLUDES ${TQTQUI_INCLUDE_DIRS} )
foreach( _dirs ${TQTQUI_LIBRARY_DIRS} )
list( APPEND CMAKE_REQUIRED_LIBRARIES "-L${_dirs}" )
endforeach()
list( APPEND CMAKE_REQUIRED_LIBRARIES ${TQTQUI_LIBRARIES} )
check_cxx_source_compiles("
#include <tqapplication.h>
int main(int argc, char **argv) { TQApplication app(argc, argv); return 0; } "
HAVE_USABLE_TQTQUI )
if( NOT HAVE_USABLE_TQTQUI )
tde_message_fatal( "Unable to build a simple tqtqui test." )
endif( )
tde_restore( CMAKE_REQUIRED_INCLUDES CMAKE_REQUIRED_LIBRARIES )
# TQTQUI_CXX_FLAGS
foreach( _flag ${TQTQUI_CFLAGS_OTHER} )
set( TQTQUI_CXX_FLAGS "${TQTQUI_CXX_FLAGS} ${_flag}" )
endforeach()

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -1,68 +0,0 @@
#################################################
#
# (C) 2010-2011 Serghei Amelian
# serghei (DOT) amelian (AT) gmail.com
#
# Improvements and feedback are welcome
#
# This file is released under GPL >= 2
#
#################################################
#################################################
#####
##### tde_internal_setup_path
macro( _tde_internal_setup_path _path _default _comment )
if( DEFINED ${_path} )
set( ${_path} "${${_path}}" CACHE PATH "${_comment}" )
else( DEFINED ${_path} )
set( ${_path} "${_default}" )
endif( DEFINED ${_path} )
endmacro( _tde_internal_setup_path )
#################################################
#####
##### tde_setup_paths
macro( tde_setup_paths )
# install paths
_tde_internal_setup_path( EXEC_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}" "Base directory for executables and libraries" )
_tde_internal_setup_path( SHARE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/share" "Base directory for files which go to share/" )
_tde_internal_setup_path( BIN_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/bin" "The install dir for executables (default ${EXEC_INSTALL_PREFIX}/bin)" )
_tde_internal_setup_path( SBIN_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/sbin" "The install dir for system executables (default ${EXEC_INSTALL_PREFIX}/sbin)" )
_tde_internal_setup_path( LIB_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/lib${LIB_SUFFIX}" "The subdirectory relative to the install prefix where libraries will be installed (default is ${EXEC_INSTALL_PREFIX}/lib${LIB_SUFFIX})" )
_tde_internal_setup_path( LIBEXEC_INSTALL_DIR "${LIB_INSTALL_DIR}/trinity/libexec" "The subdirectory relative to the install prefix where libraries will be installed (default is ${LIB_INSTALL_DIR}/trinity/libexec)" )
_tde_internal_setup_path( PKGCONFIG_INSTALL_DIR "${LIB_INSTALL_DIR}/pkgconfig" "The install dir for pkg-config metadata files" )
_tde_internal_setup_path( INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include" "The subdirectory to the header prefix" )
_tde_internal_setup_path( CMAKE_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/cmake" "The install dir for cmake import modules" )
_tde_internal_setup_path( PLUGIN_INSTALL_DIR "${LIB_INSTALL_DIR}/trinity" "The subdirectory relative to the install prefix where plugins will be installed (default is ${LIB_INSTALL_DIR}/trinity)" )
_tde_internal_setup_path( CONFIG_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/config" "The config file install dir" )
_tde_internal_setup_path( DATA_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/apps" "The parent directory where applications can install their data" )
_tde_internal_setup_path( HTML_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/doc/tde/HTML" "The HTML install dir for documentation" )
_tde_internal_setup_path( ICON_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/icons" "The icon install dir (default ${SHARE_INSTALL_PREFIX}/share/icons/)" )
_tde_internal_setup_path( KCFG_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/config.kcfg" "The install dir for tdeconfig files" )
_tde_internal_setup_path( LOCALE_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/locale" "The install dir for translations" )
_tde_internal_setup_path( APPS_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/applnk" "The install dir for the application desktop files" )
_tde_internal_setup_path( MIME_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/mimelnk" "The install dir for the mimetype desktop files" )
_tde_internal_setup_path( SERVICES_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/services" "The install dir for service (desktop, protocol, ...) files" )
_tde_internal_setup_path( SERVICETYPES_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/servicetypes" "The install dir for servicestypes desktop files" )
_tde_internal_setup_path( SOUND_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/sounds" "The install dir for sound files" )
_tde_internal_setup_path( TEMPLATES_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/templates" "The install dir for templates (Create new file...)" )
_tde_internal_setup_path( WALLPAPER_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/wallpapers" "The install dir for wallpapers" )
_tde_internal_setup_path( KCONF_UPDATE_INSTALL_DIR "${DATA_INSTALL_DIR}/tdeconf_update" "The tdeconf_update install dir" )
_tde_internal_setup_path( AUTOSTART_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/autostart" "The install dir for autostart files" )
_tde_internal_setup_path( SYSCONF_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/etc" "The sysconfig install dir (default ${CMAKE_INSTALL_PREFIX}/etc)" )
_tde_internal_setup_path( MAN_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/man" "The man install dir (default ${SHARE_INSTALL_PREFIX}/man/)" )
_tde_internal_setup_path( INFO_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/info" "The info install dir (default ${SHARE_INSTALL_PREFIX}/info)" )
_tde_internal_setup_path( XDG_MENU_INSTALL_DIR "${SYSCONF_INSTALL_DIR}/xdg/menus" "The XDG menus dir" )
_tde_internal_setup_path( XDG_APPS_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/applications/tde" "The XDG apps dir" )
_tde_internal_setup_path( XDG_DIRECTORY_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/desktop-directories" "The XDG directory" )
_tde_internal_setup_path( XDG_MIME_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/mime/packages" "The install dir for the xdg mimetypes" )
endmacro( tde_setup_paths )

@ -1,67 +0,0 @@
#################################################
#
# (C) 2010-2011 Serghei Amelian
# serghei (DOT) amelian (AT) gmail.com
#
# Improvements and feedback are welcome
#
# This file is released under GPL >= 2
#
#################################################
set( CMAKE_MODULE_PATH "${MASTER_SOURCE_DIR}/cmake/modules" )
include( TDEMacros )
get_filename_component( _ui_basename ${UI_FILE} NAME_WE )
# FIXME this will working only on out-of-source mode
set( local_ui_file ${_ui_basename}.ui )
configure_file( ${UI_FILE} ${local_ui_file} COPYONLY )
tde_execute_process( COMMAND ${TQT_REPLACE_SCRIPT} ${local_ui_file} )
# ui.h extension file, if exists
if( EXISTS "${UI_FILE}.h" )
configure_file( ${UI_FILE}.h ${local_ui_file}.h COPYONLY )
tde_execute_process( COMMAND ${TQT_REPLACE_SCRIPT} ${local_ui_file}.h )
endif( )
if( TDE_TQTPLUGINS_DIR )
set( L -L ${TDE_TQTPLUGINS_DIR} )
endif( )
tde_execute_process( COMMAND ${UIC_EXECUTABLE}
-nounload -tr tr2i18n
${L}
${local_ui_file}
OUTPUT_VARIABLE _ui_h_content )
if( _ui_h_content )
string( REGEX REPLACE "#ifndef " "#ifndef UI_" _ui_h_content "${_ui_h_content}" )
string( REGEX REPLACE "#define " "#define UI_" _ui_h_content "${_ui_h_content}" )
string( REGEX REPLACE "public TQWizard" "public KWizard" _ui_h_content "${_ui_h_content}" )
string( REGEX REPLACE "public QWizard" "public KWizard" _ui_h_content "${_ui_h_content}" )
string( REGEX REPLACE "#include <ntqwizard.h>" "#include <kwizard.h>" _ui_h_content "${_ui_h_content}" )
string( REGEX REPLACE "#include <qwizard.h>" "#include <kwizard.h>" _ui_h_content "${_ui_h_content}" )
file( WRITE ${_ui_basename}.h "${_ui_h_content}" )
endif( )
tde_execute_process( COMMAND ${UIC_EXECUTABLE}
-nounload -tr tr2i18n
${L}
-impl ${_ui_basename}.h
${local_ui_file}
OUTPUT_VARIABLE _ui_cpp_content )
if( _ui_cpp_content )
string( REGEX REPLACE "tr2i18n\\(\"\"\\)" "QString::null" _ui_cpp_content "${_ui_cpp_content}" )
string( REGEX REPLACE "tr2i18n\\(\"\", \"\"\\)" "QString::null" _ui_cpp_content "${_ui_cpp_content}" )
string( REGEX REPLACE ": TQWizard\\(" ": KWizard(" _ui_cpp_content "${_ui_cpp_content}" )
string( REGEX REPLACE ": QWizard\\(" ": KWizard(" _ui_cpp_content "${_ui_cpp_content}" )
file( WRITE ${_ui_basename}.cpp "#include <kdialog.h>\n#include <tdelocale.h>\n\n${_ui_cpp_content}" )
tde_execute_process( COMMAND ${MOC_EXECUTABLE}
${_ui_basename}.h
OUTPUT_VARIABLE _ui_h_moc_content )
file( APPEND ${_ui_basename}.cpp "${_ui_h_moc_content}" )
endif( )

@ -1,5 +0,0 @@
#ifdef _AIX
namespace {
void *not_empty_file;
}
#endif

@ -1,7 +0,0 @@
add_library( @_target@ @_type@ IMPORTED )
set_target_properties( @_target@ PROPERTIES
IMPORTED_LINK_INTERFACE_LIBRARIES "@_shared_libs@"
IMPORTED_LOCATION "@_location@"
IMPORTED_SONAME "@_soname@" )

@ -1,35 +0,0 @@
# @_laname@ - a libtool library file
# Generated by CMake - GNU libtool
#
# Please DO NOT delete this file!
# It is necessary for linking the library.
# The name that we can dlopen(3).
dlname='@_library_name_2@'
# Names of this library.
library_names='@_library_name_1@ @_library_name_2@ @_library_name_3@'
# The name of the static archive.
old_library=''
# Libraries that this one depends upon.
dependency_libs=''
# Version information for @_name@.
current=@_version_current@
age=@_version_age@
revision=@_version_revision@
# Is this an already installed library?
installed=yes
# Should we warn about portability when linking against -modules?
shouldnotlink=@_shouldnotlink@
# Files to dlopen/dlpreopen
dlopen=''
dlpreopen=''
# Directory that this library needs to be installed in:
libdir='@_libdir@'

@ -1,2 +0,0 @@
extern "C" int kdemain(int argc, char* argv[]);
int main(int argc, char* argv[]) { return kdemain(argc,argv); }

@ -1,3 +0,0 @@
#include <kdemacros.h>
extern "C" int kdemain(int argc, char* argv[]);
extern "C" KDE_EXPORT int tdeinitmain(int argc, char* argv[]) { return kdemain(argc,argv); }

@ -1,43 +0,0 @@
#-
# Copyright (c) 2017-2020 by Denis Kozadaev
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
#
# $Id$
#
#-
# Author: Denis Kozadaev (denis@tambov.ru)
#
# Please add file description here
#
TEMPLATE= app
TARGET= q15
#QT += core gui widgets sql network printsupport serialport
#exists($$(HOME)/devel/devel.pri):include($$(HOME)/devel/devel.pri)
INCLUDEPATH+= /usr/include/tqt3
TQMAKE_LDFLAGS+= /usr/lib/amd64
HEADERS= gameboard.h mainwindow.h
SOURCES= main.cpp mainwindow.cpp gameboard.cpp
# EOF

@ -1,24 +0,0 @@
# $Id: qt.FreeBSD.mk,v 1.0 2004/11/05 10:22:11 denis Exp $
QTDIR= /usr/X11R6
MOC= ${QTDIR}/bin/moc
LUPDATE= ${QTDIR}/bin/lupdate
LRELEASE= ${QTDIR}/bin/lrelease
QTCFLAGS= ${QTDIR}/include -DQT_NO_COMPAT -pthread
QTLFLAGS= -L${QTDIR}/lib -lqt-mt -pthread
CXXFLAGS+= -I${QTCFLAGS}
LDADD+= ${QTLFLAGS}
SRCMOC= ${MOCS:M*.h:R:S/$/.cxx/g}
OBJMOC= ${MOCS:M*.h:R:S/$/.mo/g}
OBJS+= ${OBJMOC}
CLEANFILES+= ${SRCMOC}
.SUFFIXES: .h .cxx .mo
.h.cxx:
${MOC} ${.IMPSRC} -o ${.TARGET}
.cxx.mo:
${CXX} ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET}

@ -1,15 +1,15 @@
#################################################
#
# (C) 2010-2011 Serghei Amelian
# serghei (DOT) amelian (AT) gmail.com
# (C) 2011-2012 Timothy Pearson
# kb9vqf (AT) pearsoncomputing (DOT) net
#
# Improvements and feedback are welcome
#
# This file is released under GPL >= 2
#
#################################################
############################################
# #
# (C) 2010-2011 Serghei Amelian #
# serghei (DOT) amelian (AT) gmail.com #
# (C) 2011-2012 Timothy Pearson #
# kb9vqf (AT) pearsoncomputing (DOT) net #
# #
# Improvements and feedback are welcome #
# #
# This file is released under GPL >= 2 #
# #
############################################
include_directories(
${CMAKE_BINARY_DIR}
@ -24,21 +24,16 @@ link_directories(
)
##### q15 #################################
##### (executable) q15
install( PROGRAMS
${CMAKE_CURRENT_BINARY_DIR}/q15
DESTINATION ${BIN_INSTALL_DIR} )
tde_add_executable( q15 AUTOMOC
SOURCES
gameboard.cpp
main.cpp
mainwindow.cpp
LINK
tqt-mt
set( target q15 )
set( ${target}_SRCS
gameboard.cpp main.cpp mainwindow.cpp
)
tde_add_executable( ${target} AUTOMOC
SOURCES ${${target}_SRCS}
LINK tqt-mt
DESTINATION ${BIN_INSTALL_DIR}
)

Loading…
Cancel
Save