summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-11-27 18:47:15 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-11-27 18:47:15 -0600
commitfbfc28021ca0dee1dfb0d84e886e4ee9d8af05a3 (patch)
tree1a83bcb9172c3f095889c79129abf522e4be240c
parenteaad965ca890c7c237c09e8dac5bed6e111adfb6 (diff)
downloadwlassistant-fbfc28021ca0dee1dfb0d84e886e4ee9d8af05a3.tar.gz
wlassistant-fbfc28021ca0dee1dfb0d84e886e4ee9d8af05a3.zip
Initial attempt at using the standard CMake system
-rw-r--r--CMakeLists.txt75
-rw-r--r--ConfigureChecks.cmake30
-rw-r--r--config.h.cmake5
-rw-r--r--icons/CMakeLists.txt12
-rw-r--r--po/CMakeLists.txt17
-rw-r--r--po/ar/wlassistant.po (renamed from po/ar.po)0
-rw-r--r--po/ca/wlassistant.po (renamed from po/ca.po)0
-rw-r--r--po/es/wlassistant.po (renamed from po/es.po)0
-rw-r--r--po/fr/wlassistant.po (renamed from po/fr.po)0
-rw-r--r--po/nb/wlassistant.po (renamed from po/nb.po)0
-rw-r--r--po/pl/wlassistant.po (renamed from po/pl.po)0
-rw-r--r--po/pt_BR/wlassistant.po (renamed from po/pt_BR.po)0
-rw-r--r--po/sv/wlassistant.po (renamed from po/sv.po)0
-rw-r--r--po/zh_CN/wlassistant.po (renamed from po/zh_CN.po)0
-rw-r--r--po/zh_TW/wlassistant.po (renamed from po/zh_TW.po)0
-rw-r--r--src/CMakeLists.txt39
16 files changed, 178 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..692f4e1
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,75 @@
+#################################################
+#
+# (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( wlassistant )
+
+
+##### 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_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 )
+add_subdirectory( icons )
+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..16f316d
--- /dev/null
+++ b/ConfigureChecks.cmake
@@ -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 )
diff --git a/config.h.cmake b/config.h.cmake
new file mode 100644
index 0000000..d81a482
--- /dev/null
+++ b/config.h.cmake
@@ -0,0 +1,5 @@
+#cmakedefine SIZEOF_INT @SIZEOF_INT@
+#cmakedefine SIZEOF_LONG @SIZEOF_LONG@
+#cmakedefine HAVE_STDINT_H 1
+#cmakedefine HAVE_SYSTEMS_H 1
+#cmakedefine HAVE_STATVFS 1 \ No newline at end of file
diff --git a/icons/CMakeLists.txt b/icons/CMakeLists.txt
new file mode 100644
index 0000000..fcacb7e
--- /dev/null
+++ b/icons/CMakeLists.txt
@@ -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( )
diff --git a/po/CMakeLists.txt b/po/CMakeLists.txt
new file mode 100644
index 0000000..77a6378
--- /dev/null
+++ b/po/CMakeLists.txt
@@ -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} wlassistant.po )
+
+foreach( _po ${po_files} )
+ get_filename_component( _lang ${_po} PATH )
+ tde_create_translation( FILES ${_po} LANG ${_lang} )
+endforeach( )
diff --git a/po/ar.po b/po/ar/wlassistant.po
index 488d5f0..488d5f0 100644
--- a/po/ar.po
+++ b/po/ar/wlassistant.po
diff --git a/po/ca.po b/po/ca/wlassistant.po
index f549756..f549756 100644
--- a/po/ca.po
+++ b/po/ca/wlassistant.po
diff --git a/po/es.po b/po/es/wlassistant.po
index 33c36f9..33c36f9 100644
--- a/po/es.po
+++ b/po/es/wlassistant.po
diff --git a/po/fr.po b/po/fr/wlassistant.po
index d484a6c..d484a6c 100644
--- a/po/fr.po
+++ b/po/fr/wlassistant.po
diff --git a/po/nb.po b/po/nb/wlassistant.po
index eba38fd..eba38fd 100644
--- a/po/nb.po
+++ b/po/nb/wlassistant.po
diff --git a/po/pl.po b/po/pl/wlassistant.po
index dec8518..dec8518 100644
--- a/po/pl.po
+++ b/po/pl/wlassistant.po
diff --git a/po/pt_BR.po b/po/pt_BR/wlassistant.po
index 208a945..208a945 100644
--- a/po/pt_BR.po
+++ b/po/pt_BR/wlassistant.po
diff --git a/po/sv.po b/po/sv/wlassistant.po
index 52da9f5..52da9f5 100644
--- a/po/sv.po
+++ b/po/sv/wlassistant.po
diff --git a/po/zh_CN.po b/po/zh_CN/wlassistant.po
index 13caf4b..13caf4b 100644
--- a/po/zh_CN.po
+++ b/po/zh_CN/wlassistant.po
diff --git a/po/zh_TW.po b/po/zh_TW/wlassistant.po
index 9947ebc..9947ebc 100644
--- a/po/zh_TW.po
+++ b/po/zh_TW/wlassistant.po
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
new file mode 100644
index 0000000..3ebb7c2
--- /dev/null
+++ b/src/CMakeLists.txt
@@ -0,0 +1,39 @@
+#################################################
+#
+# (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 wlassistant.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} )
+
+
+##### wlassistant(executable) ###################
+
+tde_add_executable( wlassistant
+ SOURCES main.cpp netlistviewitem.cpp
+ ui_NetParamsEdit.ui ui_netparamsedit.cpp
+ ui_NetParamsWizard.ui ui_netparamswizard.cpp
+ ui_main.ui waconfig.cpp watools.cpp wlassistant.cpp
+ LINK tdecore-shared tdeui-shared iw-shared
+ DESTINATION ${BIN_INSTALL_DIR}
+)