2 commits - CMakeLists.txt fbdaemon/main.cpp

Christian Mollekopf mollekopf at kolabsys.com
Wed Jul 25 14:13:06 CEST 2012


 CMakeLists.txt    |   19 +++++++++++++++----
 fbdaemon/main.cpp |   14 +++++++++-----
 2 files changed, 24 insertions(+), 9 deletions(-)

New commits:
commit 02f5ed725d611f0a518e1b1d12d20e27a42c274e
Author: Christian Mollekopf <mollekopf at kolabsys.com>
Date:   Wed Jul 25 14:12:53 2012 +0200

    Added install targets

diff --git a/CMakeLists.txt b/CMakeLists.txt
index aa2667b..9e7e21b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -64,8 +64,8 @@ QT4_WRAP_CPP(SRC_MOC
     upgradetool/kolabformatupgradejob.h
 )
 
-add_executable(upgradetool/upgradetool ${UPGRADE_SRCS} ${SRC_MOC} ${JOBS_SRCS})
-target_link_libraries(upgradetool/upgradetool ${COMMON_DEPENDENCIES})
+add_executable(kolab-formatupgrade ${UPGRADE_SRCS} ${SRC_MOC} ${JOBS_SRCS})
+target_link_libraries(kolab-formatupgrade ${COMMON_DEPENDENCIES})
 
 #Tests
 include_directories(${QT_INCLUDES} ${QT_INCLUDE_DIR} QtCore)
@@ -74,6 +74,11 @@ QT4_AUTOMOC(upgradetool/upgradetooltests.cpp)
 add_executable(upgradetooltests upgradetool/upgradetooltests.cpp upgradetool/upgradeutilities.cpp ${CMAKE_CURRENT_BINARY_DIR}/${BINDINGSTEST_MOC})
 target_link_libraries(upgradetooltests ${QT_QTTEST_LIBRARY} ${COMMON_DEPENDENCIES})
 
+install(TARGETS kolab-formatupgrade
+    RUNTIME DESTINATION ${BIN_INSTALL_DIR}
+    LIBRARY DESTINATION ${LIB_INSTALL_DIR}
+    ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
+)
 
 ########## Freebusy
 
@@ -88,5 +93,11 @@ QT4_WRAP_CPP(FB_MOC
 )
 set( FBDAEMON_SRCS ${FBDAEMON_SRCS} ${FB_MOC} ${JOBS_SRCS} )
 
-add_executable(fb ${FBDAEMON_SRCS} ${JOB_SRCS})
-target_link_libraries(fb ${COMMON_DEPENDENCIES})
+add_executable(kolab-freebusyd ${FBDAEMON_SRCS} ${JOB_SRCS})
+target_link_libraries(kolab-freebusyd ${COMMON_DEPENDENCIES})
+
+install(TARGETS kolab-freebusyd 
+    RUNTIME DESTINATION ${BIN_INSTALL_DIR}
+    LIBRARY DESTINATION ${LIB_INSTALL_DIR}
+    ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
+)
\ No newline at end of file


commit ac479150f3356112cffc4431124a2a3a5d95084c
Author: Christian Mollekopf <mollekopf at kolabsys.com>
Date:   Wed Jul 25 13:49:16 2012 +0200

    Don't require a hostname filter

diff --git a/fbdaemon/main.cpp b/fbdaemon/main.cpp
index f07f3ed..580bae5 100644
--- a/fbdaemon/main.cpp
+++ b/fbdaemon/main.cpp
@@ -44,10 +44,6 @@ int main(int argc, char *argv[])
     QCoreApplication::setApplicationName("Freebusy Daemon");
 
     KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
-    if (args->count() == 0) {
-        kWarning() << "nothing to do";
-        return 0;
-    }
 
     Settings::instance().setFile(args->getOption("config"));
 
@@ -55,9 +51,17 @@ int main(int argc, char *argv[])
     QObject::connect(&coordinator, SIGNAL(quit()), &app, SLOT(quit()));
     bool nothingTodo = true;
     if (args->isSet("generateall")) {
-        coordinator.generateForAllUsers(args->arg(0));
+        if (args->count()) {
+            coordinator.generateForAllUsers(args->arg(0));
+        } else {
+            coordinator.generateForAllUsers(QString());
+        }
         nothingTodo = false;
     } else {
+        if (args->count() == 0) {
+            kWarning() << "nothing to do";
+            return 0;
+        }
         if (args->isSet("generate")) {
             coordinator.generateForUser(args->arg(0));
             nothingTodo = false;





More information about the commits mailing list