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]...
--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-qt-examples build libcppa without Qt examples
--no-protobuf-example build libcppa without protobuf 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
......@@ -225,6 +226,9 @@ while [ $# -ne 0 ]; do
--no-qt-examples)
append_cache_entry CPPA_NO_QT_EXAMPLES STRING yes
;;
--no-protobuf-examples)
append_cache_entry CPPA_NO_PROTOBUF_EXAMPLES STRING yes
;;
--no-unit-tests)
append_cache_entry CPPA_NO_UNIT_TESTS STRING yes
;;
......
......@@ -4,9 +4,9 @@ project(cppa_examples CXX)
add_custom_target(all_examples)
macro(add name folder)
add_executable(${name} ${folder}/${name}.cpp ${ARGN})
target_link_libraries(${name} ${CMAKE_DL_LIBS} ${CPPA_LIBRARY} ${PTHREAD_LIBRARIES})
add_dependencies(${name} all_examples)
add_executable(${name} ${folder}/${name}.cpp ${ARGN})
target_link_libraries(${name} ${CMAKE_DL_LIBS} ${CPPA_LIBRARY} ${PTHREAD_LIBRARIES})
add_dependencies(${name} all_examples)
endmacro()
add(announce_1 type_system)
......@@ -22,26 +22,26 @@ add(distributed_calculator remote_actors)
add(group_server remote_actors)
add(group_chat remote_actors)
find_package(Protobuf)
if (PROTOBUF_FOUND)
if (NOT "${CPPA_NO_PROTOBUF_EXAMPLES}" STREQUAL "yes")
find_package(Protobuf)
if (PROTOBUF_FOUND)
PROTOBUF_GENERATE_CPP(ProtoSources ProtoHeaders "${CMAKE_CURRENT_SOURCE_DIR}/remote_actors/pingpong.proto")
include_directories(${PROTOBUF_INCLUDE_DIR})
add_executable(protobuf_broker remote_actors/protobuf_broker.cpp ${ProtoSources})
target_link_libraries(protobuf_broker ${CMAKE_DL_LIBS} ${CPPA_LIBRARY} ${PTHREAD_LIBRARIES} ${PROTOBUF_LIBRARIES})
add_dependencies(protobuf_broker all_examples)
endif (PROTOBUF_FOUND)
endif (PROTOBUF_FOUND)
endif ()
find_package(CURL)
if (CURL_FOUND)
add_executable(curl_fuse curl/curl_fuse.cpp)
target_link_libraries(curl_fuse ${CMAKE_DL_LIBS} ${CPPA_LIBRARY} ${PTHREAD_LIBRARIES} ${CURL_LIBRARY})
add_dependencies(curl_fuse all_examples)
add_executable(curl_fuse curl/curl_fuse.cpp)
target_link_libraries(curl_fuse ${CMAKE_DL_LIBS} ${CPPA_LIBRARY} ${PTHREAD_LIBRARIES} ${CURL_LIBRARY})
add_dependencies(curl_fuse all_examples)
endif (CURL_FOUND)
if (NOT "${CPPA_NO_QT_EXAMPLES}" STREQUAL "yes")
find_package(Qt4)
if (QT4_FOUND)
include(${QT_USE_FILE})
QT4_ADD_RESOURCES(GROUP_CHAT_RCS )
......@@ -61,7 +61,7 @@ if (NOT "${CPPA_NO_QT_EXAMPLES}" STREQUAL "yes")
${QT_LIBRARIES})
add_dependencies(qt_group_chat all_examples)
endif (QT4_FOUND)
endif()
endif ()
if (ENABLE_OPENCL)
macro(add_opencl name folder)
......@@ -69,7 +69,6 @@ if (ENABLE_OPENCL)
target_link_libraries(${name} ${CMAKE_DL_LIBS} ${CPPA_LIBRARY} ${PTHREAD_LIBRARIES} ${OPENCL_LIBRARIES})
add_dependencies(${name} all_examples)
endmacro()
add_opencl(simple_matrix opencl)
add_opencl(proper_matrix 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