Commit 6614afd3 authored by Dominik Charousset's avatar Dominik Charousset

add configure option to disable qt examples only

parent 4537ccbf
...@@ -30,6 +30,7 @@ Usage: $0 [OPTION]... [VAR=VALUE]... ...@@ -30,6 +30,7 @@ Usage: $0 [OPTION]... [VAR=VALUE]...
--with-gcc=FILE path to g++ executable --with-gcc=FILE path to g++ executable
--dual-build build both with gcc and clang --dual-build build both with gcc and clang
--no-examples build libcppa without examples --no-examples build libcppa without examples
--no-qt-examples build libcppa with all but Qt examples
--no-unit-tests build libcppa without unit tests --no-unit-tests build libcppa without unit tests
--build-static build libcppa as static and shared library --build-static build libcppa as static and shared library
--build-static-only build libcppa as static library only --build-static-only build libcppa as static library only
...@@ -213,6 +214,9 @@ while [ $# -ne 0 ]; do ...@@ -213,6 +214,9 @@ while [ $# -ne 0 ]; do
--no-examples) --no-examples)
append_cache_entry CPPA_NO_EXAMPLES STRING yes append_cache_entry CPPA_NO_EXAMPLES STRING yes
;; ;;
--no-qt-examples)
append_cache_entry CPPA_NO_QT_EXAMPLES STRING yes
;;
--no-unit-tests) --no-unit-tests)
append_cache_entry CPPA_NO_UNIT_TESTS STRING yes append_cache_entry CPPA_NO_UNIT_TESTS STRING yes
;; ;;
......
...@@ -22,24 +22,27 @@ add(distributed_math_actor remote_actors) ...@@ -22,24 +22,27 @@ add(distributed_math_actor remote_actors)
add(group_server remote_actors) add(group_server remote_actors)
add(group_chat remote_actors) add(group_chat remote_actors)
find_package(Qt4) if (NOT "${CPPA_NO_QT_EXAMPLES}" STREQUAL "yes")
if (QT4_FOUND) find_package(Qt4)
include(${QT_USE_FILE})
QT4_ADD_RESOURCES(GROUP_CHAT_RCS ) if (QT4_FOUND)
QT4_WRAP_UI(GROUP_CHAT_UI_HDR qtsupport/chatwindow.ui) include(${QT_USE_FILE})
QT4_WRAP_CPP(GROUP_CHAT_MOC_SRC qtsupport/chatwidget.hpp) QT4_ADD_RESOURCES(GROUP_CHAT_RCS )
# generated headers will be in cmake build directory QT4_WRAP_UI(GROUP_CHAT_UI_HDR qtsupport/chatwindow.ui)
#include_directories(. qtsupport ${CMAKE_CURRENT_BINARY_DIR} ${CPPA_INCLUDE}) QT4_WRAP_CPP(GROUP_CHAT_MOC_SRC qtsupport/chatwidget.hpp)
include_directories(qtsupport ${CMAKE_CURRENT_BINARY_DIR}) # generated headers will be in cmake build directory
set(GROUP_CHAT_SRCS qtsupport/qt_group_chat.cpp qtsupport/chatwidget.cpp) #include_directories(. qtsupport ${CMAKE_CURRENT_BINARY_DIR} ${CPPA_INCLUDE})
add_executable(qt_group_chat include_directories(qtsupport ${CMAKE_CURRENT_BINARY_DIR})
${GROUP_CHAT_SRCS} set(GROUP_CHAT_SRCS qtsupport/qt_group_chat.cpp qtsupport/chatwidget.cpp)
${GROUP_CHAT_MOC_SRC} add_executable(qt_group_chat
${GROUP_CHAT_UI_HDR}) ${GROUP_CHAT_SRCS}
target_link_libraries(qt_group_chat ${GROUP_CHAT_MOC_SRC}
${CMAKE_DL_LIBS} ${GROUP_CHAT_UI_HDR})
${CPPA_LIBRARY} target_link_libraries(qt_group_chat
${QT_LIBRARIES}) ${CMAKE_DL_LIBS}
add_dependencies(qt_group_chat all_examples) ${CPPA_LIBRARY}
endif (QT4_FOUND) ${QT_LIBRARIES})
add_dependencies(qt_group_chat all_examples)
endif (QT4_FOUND)
endif()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment