Commit dd5c4195 authored by Dominik Charousset's avatar Dominik Charousset

added --no-protobuf-example configure option

parent 904b5b3c
...@@ -30,7 +30,8 @@ Usage: $0 [OPTION]... [VAR=VALUE]... ...@@ -30,7 +30,8 @@ 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-qt-examples build libcppa without Qt examples
--no-protobuf-example build libcppa without protobuf 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
...@@ -225,6 +226,9 @@ while [ $# -ne 0 ]; do ...@@ -225,6 +226,9 @@ while [ $# -ne 0 ]; do
--no-qt-examples) --no-qt-examples)
append_cache_entry CPPA_NO_QT_EXAMPLES STRING yes append_cache_entry CPPA_NO_QT_EXAMPLES STRING yes
;; ;;
--no-protobuf-examples)
append_cache_entry CPPA_NO_PROTOBUF_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,14 +22,16 @@ add(distributed_calculator remote_actors) ...@@ -22,14 +22,16 @@ add(distributed_calculator remote_actors)
add(group_server remote_actors) add(group_server remote_actors)
add(group_chat remote_actors) add(group_chat remote_actors)
find_package(Protobuf) if (NOT "${CPPA_NO_PROTOBUF_EXAMPLES}" STREQUAL "yes")
if (PROTOBUF_FOUND) find_package(Protobuf)
if (PROTOBUF_FOUND)
PROTOBUF_GENERATE_CPP(ProtoSources ProtoHeaders "${CMAKE_CURRENT_SOURCE_DIR}/remote_actors/pingpong.proto") PROTOBUF_GENERATE_CPP(ProtoSources ProtoHeaders "${CMAKE_CURRENT_SOURCE_DIR}/remote_actors/pingpong.proto")
include_directories(${PROTOBUF_INCLUDE_DIR}) include_directories(${PROTOBUF_INCLUDE_DIR})
add_executable(protobuf_broker remote_actors/protobuf_broker.cpp ${ProtoSources}) add_executable(protobuf_broker remote_actors/protobuf_broker.cpp ${ProtoSources})
target_link_libraries(protobuf_broker ${CMAKE_DL_LIBS} ${CPPA_LIBRARY} ${PTHREAD_LIBRARIES} ${PROTOBUF_LIBRARIES}) target_link_libraries(protobuf_broker ${CMAKE_DL_LIBS} ${CPPA_LIBRARY} ${PTHREAD_LIBRARIES} ${PROTOBUF_LIBRARIES})
add_dependencies(protobuf_broker all_examples) add_dependencies(protobuf_broker all_examples)
endif (PROTOBUF_FOUND) endif (PROTOBUF_FOUND)
endif ()
find_package(CURL) find_package(CURL)
if (CURL_FOUND) if (CURL_FOUND)
...@@ -39,9 +41,7 @@ if (CURL_FOUND) ...@@ -39,9 +41,7 @@ if (CURL_FOUND)
endif (CURL_FOUND) endif (CURL_FOUND)
if (NOT "${CPPA_NO_QT_EXAMPLES}" STREQUAL "yes") if (NOT "${CPPA_NO_QT_EXAMPLES}" STREQUAL "yes")
find_package(Qt4) find_package(Qt4)
if (QT4_FOUND) if (QT4_FOUND)
include(${QT_USE_FILE}) include(${QT_USE_FILE})
QT4_ADD_RESOURCES(GROUP_CHAT_RCS ) QT4_ADD_RESOURCES(GROUP_CHAT_RCS )
...@@ -61,7 +61,7 @@ if (NOT "${CPPA_NO_QT_EXAMPLES}" STREQUAL "yes") ...@@ -61,7 +61,7 @@ if (NOT "${CPPA_NO_QT_EXAMPLES}" STREQUAL "yes")
${QT_LIBRARIES}) ${QT_LIBRARIES})
add_dependencies(qt_group_chat all_examples) add_dependencies(qt_group_chat all_examples)
endif (QT4_FOUND) endif (QT4_FOUND)
endif() endif ()
if (ENABLE_OPENCL) if (ENABLE_OPENCL)
macro(add_opencl name folder) macro(add_opencl name folder)
...@@ -69,7 +69,6 @@ if (ENABLE_OPENCL) ...@@ -69,7 +69,6 @@ if (ENABLE_OPENCL)
target_link_libraries(${name} ${CMAKE_DL_LIBS} ${CPPA_LIBRARY} ${PTHREAD_LIBRARIES} ${OPENCL_LIBRARIES}) target_link_libraries(${name} ${CMAKE_DL_LIBS} ${CPPA_LIBRARY} ${PTHREAD_LIBRARIES} ${OPENCL_LIBRARIES})
add_dependencies(${name} all_examples) add_dependencies(${name} all_examples)
endmacro() endmacro()
add_opencl(simple_matrix opencl) add_opencl(simple_matrix opencl)
add_opencl(proper_matrix opencl) add_opencl(proper_matrix opencl)
endif (ENABLE_OPENCL) endif (ENABLE_OPENCL)
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