Permalink
Browse files

add configure option to disable qt examples only

  • Loading branch information...
1 parent 4537ccb commit 6614afd36c11f61e84054e378f5da1b390e6f758 @Neverlord Neverlord committed Nov 28, 2012
Showing with 27 additions and 20 deletions.
  1. +4 −0 configure
  2. +23 −20 examples/CMakeLists.txt
View
@@ -30,6 +30,7 @@ Usage: $0 [OPTION]... [VAR=VALUE]...
--with-gcc=FILE path to g++ executable
--dual-build build both with gcc and clang
--no-examples build libcppa without examples
+ --no-qt-examples build libcppa with all but Qt examples
--no-unit-tests build libcppa without unit tests
--build-static build libcppa as static and shared library
--build-static-only build libcppa as static library only
@@ -213,6 +214,9 @@ while [ $# -ne 0 ]; do
--no-examples)
append_cache_entry CPPA_NO_EXAMPLES STRING yes
;;
+ --no-qt-examples)
+ append_cache_entry CPPA_NO_QT_EXAMPLES STRING yes
+ ;;
--no-unit-tests)
append_cache_entry CPPA_NO_UNIT_TESTS STRING yes
;;
@@ -22,24 +22,27 @@ add(distributed_math_actor remote_actors)
add(group_server remote_actors)
add(group_chat remote_actors)
-find_package(Qt4)
+if (NOT "${CPPA_NO_QT_EXAMPLES}" STREQUAL "yes")
-if (QT4_FOUND)
- include(${QT_USE_FILE})
- QT4_ADD_RESOURCES(GROUP_CHAT_RCS )
- QT4_WRAP_UI(GROUP_CHAT_UI_HDR qtsupport/chatwindow.ui)
- QT4_WRAP_CPP(GROUP_CHAT_MOC_SRC qtsupport/chatwidget.hpp)
- # generated headers will be in cmake build directory
- #include_directories(. qtsupport ${CMAKE_CURRENT_BINARY_DIR} ${CPPA_INCLUDE})
- include_directories(qtsupport ${CMAKE_CURRENT_BINARY_DIR})
- set(GROUP_CHAT_SRCS qtsupport/qt_group_chat.cpp qtsupport/chatwidget.cpp)
- add_executable(qt_group_chat
- ${GROUP_CHAT_SRCS}
- ${GROUP_CHAT_MOC_SRC}
- ${GROUP_CHAT_UI_HDR})
- target_link_libraries(qt_group_chat
- ${CMAKE_DL_LIBS}
- ${CPPA_LIBRARY}
- ${QT_LIBRARIES})
- add_dependencies(qt_group_chat all_examples)
-endif (QT4_FOUND)
+ find_package(Qt4)
+
+ if (QT4_FOUND)
+ include(${QT_USE_FILE})
+ QT4_ADD_RESOURCES(GROUP_CHAT_RCS )
+ QT4_WRAP_UI(GROUP_CHAT_UI_HDR qtsupport/chatwindow.ui)
+ QT4_WRAP_CPP(GROUP_CHAT_MOC_SRC qtsupport/chatwidget.hpp)
+ # generated headers will be in cmake build directory
+ #include_directories(. qtsupport ${CMAKE_CURRENT_BINARY_DIR} ${CPPA_INCLUDE})
+ include_directories(qtsupport ${CMAKE_CURRENT_BINARY_DIR})
+ set(GROUP_CHAT_SRCS qtsupport/qt_group_chat.cpp qtsupport/chatwidget.cpp)
+ add_executable(qt_group_chat
+ ${GROUP_CHAT_SRCS}
+ ${GROUP_CHAT_MOC_SRC}
+ ${GROUP_CHAT_UI_HDR})
+ target_link_libraries(qt_group_chat
+ ${CMAKE_DL_LIBS}
+ ${CPPA_LIBRARY}
+ ${QT_LIBRARIES})
+ add_dependencies(qt_group_chat all_examples)
+ endif (QT4_FOUND)
+endif()

0 comments on commit 6614afd

Please sign in to comment.