diff options
author | Denis Kozadaev <denis@dilos.org> | 2020-03-28 17:45:12 +0300 |
---|---|---|
committer | Denis Kozadaev <denis@dilos.org> | 2020-03-28 17:45:12 +0300 |
commit | b93fd6da0b9fd56962db2ea64f98da30d5f93538 (patch) | |
tree | 9e20e7301f6d6ed7b45750718d6998a0d39e2ced /qnetchess/cmake/modules/FindTQtQUI.cmake | |
parent | 62af0157e055222214ab132575e41f924e997ff1 (diff) | |
download | tdegames-b93fd6da0b9fd56962db2ea64f98da30d5f93538.tar.gz tdegames-b93fd6da0b9fd56962db2ea64f98da30d5f93538.zip |
Network Chess game for two playersqnetchess
Signed-off-by: Denis Kozadaev <denis@dilos.org>
Diffstat (limited to 'qnetchess/cmake/modules/FindTQtQUI.cmake')
-rw-r--r-- | qnetchess/cmake/modules/FindTQtQUI.cmake | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/qnetchess/cmake/modules/FindTQtQUI.cmake b/qnetchess/cmake/modules/FindTQtQUI.cmake new file mode 100644 index 00000000..32dd245e --- /dev/null +++ b/qnetchess/cmake/modules/FindTQtQUI.cmake @@ -0,0 +1,45 @@ +################################################# +# +# (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() |