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]...
--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()
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