summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsamelian <samelian@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-09-20 19:08:10 +0000
committersamelian <samelian@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-09-20 19:08:10 +0000
commitfa8a6a4aa1313667249adc0fd8eaac368c23903a (patch)
treea57704b015e871c60bf84dc520dba406adf35ff1
parent4cad91311b47c94efb14a926130e45fe3662ef05 (diff)
downloadtdenetwork-fa8a6a4aa1313667249adc0fd8eaac368c23903a.tar.gz
tdenetwork-fa8a6a4aa1313667249adc0fd8eaac368c23903a.zip
[kdenetwork/wifi] added cmake support
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1254683 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
-rw-r--r--CMakeLists.txt3
-rw-r--r--config.h.cmake3
-rw-r--r--wifi/CMakeLists.txt53
-rw-r--r--wifi/ConfigureChecks.cmake34
-rw-r--r--wifi/kcmwifi/CMakeLists.txt38
-rw-r--r--wifi/kwireless/CMakeLists.txt37
-rw-r--r--wifi/locations/CMakeLists.txt14
-rw-r--r--wifi/pixmaps/CMakeLists.txt15
8 files changed, 197 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c4293d53..d7123909 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -48,6 +48,7 @@ option( WITH_JINGLE "Enable jingle support (kopete)" OFF )
option( WITH_SPEEX "Enable speex support (for jingle)" OFF )
option( WITH_WEBCAM "Enable webcam support (kopete/msn)" OFF )
option( WITH_GSM "Enable GSM SMS support (kopete/sms)" OFF )
+option( WITH_ARTS "Enable aRts support" OFF )
##### kopete protocols ##########################
@@ -108,6 +109,7 @@ option( BUILD_KSIRC "Build ksirc" ${BUILD_ALL} )
option( BUILD_KTALKD "Build ktalkd" ${BUILD_ALL} )
option( BUILD_LANBROWSING "Build lanbrowsing" ${BUILD_ALL} )
option( BUILD_LIBRSS "Build librss" ${BUILD_ALL} )
+option( BUILD_WIFI "Build wifi" ${BUILD_ALL} )
##### configure checks ##########################
@@ -145,6 +147,7 @@ tde_conditional_add_subdirectory( BUILD_KSIRC ksirc )
tde_conditional_add_subdirectory( BUILD_KTALKD ktalkd )
tde_conditional_add_subdirectory( BUILD_LANBROWSING lanbrowsing )
tde_conditional_add_subdirectory( BUILD_LIBRSS librss )
+tde_conditional_add_subdirectory( BUILD_WIFI wifi )
##### write configure files #####################
diff --git a/config.h.cmake b/config.h.cmake
index 7283634b..982dd208 100644
--- a/config.h.cmake
+++ b/config.h.cmake
@@ -34,6 +34,9 @@
#define UTMP_AND_PROC_FIND_USER 1
#define ALL_PROCESSES_AND_PROC_FIND_USER 1
+// wifi
+#cmakedefine WITHOUT_ARTS 1
+
#ifdef __cplusplus
extern "C" {
unsigned long strlcpy(char*, const char*, unsigned long);
diff --git a/wifi/CMakeLists.txt b/wifi/CMakeLists.txt
new file mode 100644
index 00000000..45fd558b
--- /dev/null
+++ b/wifi/CMakeLists.txt
@@ -0,0 +1,53 @@
+#################################################
+#
+# (C) 2010-2011 Serghei Amelian
+# serghei (DOT) amelian (AT) gmail.com
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+include( ConfigureChecks.cmake )
+
+add_subdirectory( kcmwifi )
+add_subdirectory( kwireless )
+add_subdirectory( pixmaps )
+add_subdirectory( locations )
+
+include_directories(
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_BINARY_DIR}
+ ${TDE_INCLUDE_DIR}
+ ${TQT_INCLUDE_DIRS}
+)
+
+link_directories(
+ ${TQT_LIBRARY_DIRS}
+ ${ARTS_LIBRARY_DIRS}
+)
+
+if( WITH_ARTS )
+ set( ARTS_LIBRARIES artsflow;mcop )
+endif( )
+
+
+##### other data ################################
+
+tde_install_icons( )
+install( FILES kwifimanagerui.rc DESTINATION ${DATA_INSTALL_DIR}/kwifimanager )
+install( FILES kwifimanager.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} )
+
+
+##### kwifimanager (executable) #################
+
+tde_add_executable( kwifimanager AUTOMOC
+ SOURCES
+ interface_wireless.cpp interface_wireless_wirelessextensions.cpp
+ interface_dcop.skel networkscanning.cpp kwifimanager.cpp locator.cpp
+ main.cpp picture.cpp speed.cpp statistics.cpp status.cpp strength.cpp
+ asusled.cpp
+ LINK kdeui-shared ${ARTS_LIBRARIES} ${IW_LIBRARY}
+ DESTINATION ${BIN_INSTALL_DIR}
+)
diff --git a/wifi/ConfigureChecks.cmake b/wifi/ConfigureChecks.cmake
new file mode 100644
index 00000000..f3a7ddb2
--- /dev/null
+++ b/wifi/ConfigureChecks.cmake
@@ -0,0 +1,34 @@
+#################################################
+#
+# (C) 2010-2011 Serghei Amelian
+# serghei (DOT) amelian (AT) gmail.com
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+# check for aRts
+if( WITH_ARTS )
+ pkg_search_module( ARTS arts )
+ if( NOT ARTS_FOUND )
+ tde_message_fatal( "aRts is requested, but was not found on your system" )
+ endif( )
+else( )
+ set( WITHOUT_ARTS 1 CACHE INTERNAL "" FORCE )
+endif( )
+
+
+# check for wireless tools
+check_library_exists( iw iw_get_stats "" HAVE_IW )
+if( HAVE_IW )
+ check_include_file( iwlib.h HAVE_IWLIB_H )
+ # we need at least wireless tools >= 27
+ add_definitions( -DHAVE_IW_27 -DHAVE_IW_27pre19 )
+endif( )
+if( HAVE_IW AND HAVE_IWLIB_H )
+ set( IW_LIBRARY iw )
+else( )
+ tde_message_fatal( "wifi support needs wireless tools >= 27, but was not found on your system" )
+endif( )
diff --git a/wifi/kcmwifi/CMakeLists.txt b/wifi/kcmwifi/CMakeLists.txt
new file mode 100644
index 00000000..d7d5e5c1
--- /dev/null
+++ b/wifi/kcmwifi/CMakeLists.txt
@@ -0,0 +1,38 @@
+#################################################
+#
+# (C) 2010-2011 Serghei Amelian
+# serghei (DOT) amelian (AT) gmail.com
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+include_directories(
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${TDE_INCLUDE_DIR}
+ ${TQT_INCLUDE_DIRS}
+)
+
+link_directories(
+ ${TQT_LIBRARY_DIRS}
+)
+
+
+##### other data ################################
+
+install( FILES kcmwifi.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} )
+
+
+##### kcm_wifi (module) #########################
+
+tde_add_kpart( kcm_wifi AUTOMOC
+ SOURCES
+ wificonfig.cpp kcmwifi.cpp configcrypto.ui ifconfigpagebase.ui
+ configpower.ui mainconfigbase.ui mainconfig.cpp ifconfigpage.cpp
+ vendorconfig.cpp
+ LINK kio-shared
+ DESTINATION ${PLUGIN_INSTALL_DIR}
+)
diff --git a/wifi/kwireless/CMakeLists.txt b/wifi/kwireless/CMakeLists.txt
new file mode 100644
index 00000000..5acfb5ae
--- /dev/null
+++ b/wifi/kwireless/CMakeLists.txt
@@ -0,0 +1,37 @@
+#################################################
+#
+# (C) 2010-2011 Serghei Amelian
+# serghei (DOT) amelian (AT) gmail.com
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+include_directories(
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_BINARY_DIR}
+ ${TDE_INCLUDE_DIR}
+ ${TQT_INCLUDE_DIRS}
+)
+
+link_directories(
+ ${TQT_LIBRARY_DIRS}
+)
+
+
+##### other data ################################
+
+install( FILES kwireless.desktop DESTINATION ${DATA_INSTALL_DIR}/kicker/applets )
+
+
+##### libkwireless (module) #####################
+
+tde_add_kpart( libkwireless AUTOMOC
+ SOURCES
+ kwireless.cpp kwirelesswidget.cpp linuxwirelesswidget.cpp
+ propertytablebase.ui propertytable.cpp
+ LINK kdeui-shared ${IW_LIBRARY}
+ DESTINATION ${PLUGIN_INSTALL_DIR}
+)
diff --git a/wifi/locations/CMakeLists.txt b/wifi/locations/CMakeLists.txt
new file mode 100644
index 00000000..f506214a
--- /dev/null
+++ b/wifi/locations/CMakeLists.txt
@@ -0,0 +1,14 @@
+#################################################
+#
+# (C) 2010-2011 Serghei Amelian
+# serghei (DOT) amelian (AT) gmail.com
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+install( FILES
+ DE_BW_Karlsruhe_University.loc NOWHERE.loc
+ DESTINATION ${DATA_INSTALL_DIR}/kwifimanager/locations )
diff --git a/wifi/pixmaps/CMakeLists.txt b/wifi/pixmaps/CMakeLists.txt
new file mode 100644
index 00000000..c7d50fdf
--- /dev/null
+++ b/wifi/pixmaps/CMakeLists.txt
@@ -0,0 +1,15 @@
+#################################################
+#
+# (C) 2010-2011 Serghei Amelian
+# serghei (DOT) amelian (AT) gmail.com
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+install( FILES
+ ad_hoc.png all_alone.png ap_connect.png excellent.png good.png
+ marginal.png no_card.png offline.png oor_down.png oor_minimum.png
+ DESTINATION ${DATA_INSTALL_DIR}/kwifimanager/pics )