1cmake_minimum_required(VERSION 3.2 FATAL_ERROR) 2 3project(rxcpp VERSION 2.2.4 LANGUAGES C CXX) 4 5set_property(GLOBAL PROPERTY USE_FOLDERS ON) 6 7# define some folders 8 9get_filename_component(RXCPP_DIR "${CMAKE_CURRENT_SOURCE_DIR}" PATH) 10get_filename_component(RXCPP_DIR "${RXCPP_DIR}" PATH) 11 12MESSAGE( STATUS "RXCPP_DIR: " ${RXCPP_DIR} ) 13 14add_subdirectory(${RXCPP_DIR}/Rx/v2/test ${CMAKE_CURRENT_BINARY_DIR}/test) 15 16add_subdirectory(${RXCPP_DIR}/projects/doxygen ${CMAKE_CURRENT_BINARY_DIR}/projects/doxygen) 17 18set(EXAMPLES_DIR ${RXCPP_DIR}/Rx/v2/examples) 19 20add_subdirectory(${EXAMPLES_DIR}/cep ${CMAKE_CURRENT_BINARY_DIR}/examples/cep) 21add_subdirectory(${EXAMPLES_DIR}/stop ${CMAKE_CURRENT_BINARY_DIR}/examples/stop) 22add_subdirectory(${EXAMPLES_DIR}/linesfrombytes ${CMAKE_CURRENT_BINARY_DIR}/examples/linesfrombytes) 23add_subdirectory(${EXAMPLES_DIR}/println ${CMAKE_CURRENT_BINARY_DIR}/examples/println) 24add_subdirectory(${EXAMPLES_DIR}/pythagorian ${CMAKE_CURRENT_BINARY_DIR}/examples/pythagorian) 25add_subdirectory(${EXAMPLES_DIR}/tests ${CMAKE_CURRENT_BINARY_DIR}/examples/tests) 26 27# The list of RxCpp source files. Please add every new file to this list 28set(RX_SOURCES 29 ${RXCPP_DIR}/Rx/v2/src/rxcpp/operators/rx-all.hpp 30 ${RXCPP_DIR}/Rx/v2/src/rxcpp/operators/rx-amb.hpp 31 ${RXCPP_DIR}/Rx/v2/src/rxcpp/operators/rx-any.hpp 32 ${RXCPP_DIR}/Rx/v2/src/rxcpp/operators/rx-buffer_count.hpp 33 ${RXCPP_DIR}/Rx/v2/src/rxcpp/operators/rx-buffer_time.hpp 34 ${RXCPP_DIR}/Rx/v2/src/rxcpp/operators/rx-buffer_time_count.hpp 35 ${RXCPP_DIR}/Rx/v2/src/rxcpp/operators/rx-combine_latest.hpp 36 ${RXCPP_DIR}/Rx/v2/src/rxcpp/operators/rx-concat.hpp 37 ${RXCPP_DIR}/Rx/v2/src/rxcpp/operators/rx-concat_map.hpp 38 ${RXCPP_DIR}/Rx/v2/src/rxcpp/operators/rx-connect_forever.hpp 39 ${RXCPP_DIR}/Rx/v2/src/rxcpp/operators/rx-debounce.hpp 40 ${RXCPP_DIR}/Rx/v2/src/rxcpp/operators/rx-delay.hpp 41 ${RXCPP_DIR}/Rx/v2/src/rxcpp/operators/rx-distinct.hpp 42 ${RXCPP_DIR}/Rx/v2/src/rxcpp/operators/rx-distinct_until_changed.hpp 43 ${RXCPP_DIR}/Rx/v2/src/rxcpp/operators/rx-element_at.hpp 44 ${RXCPP_DIR}/Rx/v2/src/rxcpp/operators/rx-filter.hpp 45 ${RXCPP_DIR}/Rx/v2/src/rxcpp/operators/rx-finally.hpp 46 ${RXCPP_DIR}/Rx/v2/src/rxcpp/operators/rx-flat_map.hpp 47 ${RXCPP_DIR}/Rx/v2/src/rxcpp/operators/rx-group_by.hpp 48 ${RXCPP_DIR}/Rx/v2/src/rxcpp/operators/rx-ignore_elements.hpp 49 ${RXCPP_DIR}/Rx/v2/src/rxcpp/operators/rx-lift.hpp 50 ${RXCPP_DIR}/Rx/v2/src/rxcpp/operators/rx-map.hpp 51 ${RXCPP_DIR}/Rx/v2/src/rxcpp/operators/rx-merge.hpp 52 ${RXCPP_DIR}/Rx/v2/src/rxcpp/operators/rx-merge_delay_error.hpp 53 ${RXCPP_DIR}/Rx/v2/src/rxcpp/operators/rx-multicast.hpp 54 ${RXCPP_DIR}/Rx/v2/src/rxcpp/operators/rx-observe_on.hpp 55 ${RXCPP_DIR}/Rx/v2/src/rxcpp/operators/rx-on_error_resume_next.hpp 56 ${RXCPP_DIR}/Rx/v2/src/rxcpp/operators/rx-pairwise.hpp 57 ${RXCPP_DIR}/Rx/v2/src/rxcpp/operators/rx-publish.hpp 58 ${RXCPP_DIR}/Rx/v2/src/rxcpp/operators/rx-reduce.hpp 59 ${RXCPP_DIR}/Rx/v2/src/rxcpp/operators/rx-ref_count.hpp 60 ${RXCPP_DIR}/Rx/v2/src/rxcpp/operators/rx-repeat.hpp 61 ${RXCPP_DIR}/Rx/v2/src/rxcpp/operators/rx-replay.hpp 62 ${RXCPP_DIR}/Rx/v2/src/rxcpp/operators/rx-retry-repeat-common.hpp 63 ${RXCPP_DIR}/Rx/v2/src/rxcpp/operators/rx-retry.hpp 64 ${RXCPP_DIR}/Rx/v2/src/rxcpp/operators/rx-sample_time.hpp 65 ${RXCPP_DIR}/Rx/v2/src/rxcpp/operators/rx-scan.hpp 66 ${RXCPP_DIR}/Rx/v2/src/rxcpp/operators/rx-sequence_equal.hpp 67 ${RXCPP_DIR}/Rx/v2/src/rxcpp/operators/rx-skip.hpp 68 ${RXCPP_DIR}/Rx/v2/src/rxcpp/operators/rx-skip_while.hpp 69 ${RXCPP_DIR}/Rx/v2/src/rxcpp/operators/rx-skip_last.hpp 70 ${RXCPP_DIR}/Rx/v2/src/rxcpp/operators/rx-skip_until.hpp 71 ${RXCPP_DIR}/Rx/v2/src/rxcpp/operators/rx-start_with.hpp 72 ${RXCPP_DIR}/Rx/v2/src/rxcpp/operators/rx-subscribe.hpp 73 ${RXCPP_DIR}/Rx/v2/src/rxcpp/operators/rx-subscribe_on.hpp 74 ${RXCPP_DIR}/Rx/v2/src/rxcpp/operators/rx-switch_if_empty.hpp 75 ${RXCPP_DIR}/Rx/v2/src/rxcpp/operators/rx-switch_on_next.hpp 76 ${RXCPP_DIR}/Rx/v2/src/rxcpp/operators/rx-take.hpp 77 ${RXCPP_DIR}/Rx/v2/src/rxcpp/operators/rx-take_last.hpp 78 ${RXCPP_DIR}/Rx/v2/src/rxcpp/operators/rx-take_until.hpp 79 ${RXCPP_DIR}/Rx/v2/src/rxcpp/operators/rx-take_while.hpp 80 ${RXCPP_DIR}/Rx/v2/src/rxcpp/operators/rx-tap.hpp 81 ${RXCPP_DIR}/Rx/v2/src/rxcpp/operators/rx-time_interval.hpp 82 ${RXCPP_DIR}/Rx/v2/src/rxcpp/operators/rx-timeout.hpp 83 ${RXCPP_DIR}/Rx/v2/src/rxcpp/operators/rx-timestamp.hpp 84 ${RXCPP_DIR}/Rx/v2/src/rxcpp/operators/rx-with_latest_from.hpp 85 ${RXCPP_DIR}/Rx/v2/src/rxcpp/operators/rx-window.hpp 86 ${RXCPP_DIR}/Rx/v2/src/rxcpp/operators/rx-window_time.hpp 87 ${RXCPP_DIR}/Rx/v2/src/rxcpp/operators/rx-window_toggle.hpp 88 ${RXCPP_DIR}/Rx/v2/src/rxcpp/operators/rx-window_time_count.hpp 89 ${RXCPP_DIR}/Rx/v2/src/rxcpp/operators/rx-zip.hpp 90 ${RXCPP_DIR}/Rx/v2/src/rxcpp/rx-composite_exception.hpp 91 ${RXCPP_DIR}/Rx/v2/src/rxcpp/rx-connectable_observable.hpp 92 ${RXCPP_DIR}/Rx/v2/src/rxcpp/rx-coordination.hpp 93 ${RXCPP_DIR}/Rx/v2/src/rxcpp/rx-coroutine.hpp 94 ${RXCPP_DIR}/Rx/v2/src/rxcpp/rx-grouped_observable.hpp 95 ${RXCPP_DIR}/Rx/v2/src/rxcpp/rx-includes.hpp 96 ${RXCPP_DIR}/Rx/v2/src/rxcpp/rx-lite.hpp 97 ${RXCPP_DIR}/Rx/v2/src/rxcpp/rx-notification.hpp 98 ${RXCPP_DIR}/Rx/v2/src/rxcpp/rx-observable.hpp 99 ${RXCPP_DIR}/Rx/v2/src/rxcpp/rx-observer.hpp 100 ${RXCPP_DIR}/Rx/v2/src/rxcpp/rx-operators.hpp 101 ${RXCPP_DIR}/Rx/v2/src/rxcpp/rx-predef.hpp 102 ${RXCPP_DIR}/Rx/v2/src/rxcpp/rx-scheduler.hpp 103 ${RXCPP_DIR}/Rx/v2/src/rxcpp/rx-sources.hpp 104 ${RXCPP_DIR}/Rx/v2/src/rxcpp/rx-subjects.hpp 105 ${RXCPP_DIR}/Rx/v2/src/rxcpp/rx-subscriber.hpp 106 ${RXCPP_DIR}/Rx/v2/src/rxcpp/rx-subscription.hpp 107 ${RXCPP_DIR}/Rx/v2/src/rxcpp/rx-test.hpp 108 ${RXCPP_DIR}/Rx/v2/src/rxcpp/rx-trace.hpp 109 ${RXCPP_DIR}/Rx/v2/src/rxcpp/rx-util.hpp 110 ${RXCPP_DIR}/Rx/v2/src/rxcpp/rx.hpp 111 ${RXCPP_DIR}/Rx/v2/src/rxcpp/schedulers/rx-currentthread.hpp 112 ${RXCPP_DIR}/Rx/v2/src/rxcpp/schedulers/rx-eventloop.hpp 113 ${RXCPP_DIR}/Rx/v2/src/rxcpp/schedulers/rx-immediate.hpp 114 ${RXCPP_DIR}/Rx/v2/src/rxcpp/schedulers/rx-newthread.hpp 115 ${RXCPP_DIR}/Rx/v2/src/rxcpp/schedulers/rx-runloop.hpp 116 ${RXCPP_DIR}/Rx/v2/src/rxcpp/schedulers/rx-sameworker.hpp 117 ${RXCPP_DIR}/Rx/v2/src/rxcpp/schedulers/rx-test.hpp 118 ${RXCPP_DIR}/Rx/v2/src/rxcpp/schedulers/rx-virtualtime.hpp 119 ${RXCPP_DIR}/Rx/v2/src/rxcpp/sources/rx-create.hpp 120 ${RXCPP_DIR}/Rx/v2/src/rxcpp/sources/rx-defer.hpp 121 ${RXCPP_DIR}/Rx/v2/src/rxcpp/sources/rx-empty.hpp 122 ${RXCPP_DIR}/Rx/v2/src/rxcpp/sources/rx-error.hpp 123 ${RXCPP_DIR}/Rx/v2/src/rxcpp/sources/rx-interval.hpp 124 ${RXCPP_DIR}/Rx/v2/src/rxcpp/sources/rx-iterate.hpp 125 ${RXCPP_DIR}/Rx/v2/src/rxcpp/sources/rx-never.hpp 126 ${RXCPP_DIR}/Rx/v2/src/rxcpp/sources/rx-range.hpp 127 ${RXCPP_DIR}/Rx/v2/src/rxcpp/sources/rx-scope.hpp 128 ${RXCPP_DIR}/Rx/v2/src/rxcpp/sources/rx-timer.hpp 129 ${RXCPP_DIR}/Rx/v2/src/rxcpp/subjects/rx-behavior.hpp 130 ${RXCPP_DIR}/Rx/v2/src/rxcpp/subjects/rx-replaysubject.hpp 131 ${RXCPP_DIR}/Rx/v2/src/rxcpp/subjects/rx-subject.hpp 132 ${RXCPP_DIR}/Rx/v2/src/rxcpp/subjects/rx-synchronize.hpp 133) 134 135# Grouping all the source files puts them into a virtual folder in Visual Studio 136source_group("src" FILES ${RX_SOURCES}) 137 138if (MSVC) 139# This 'RxCpp' build target only appears to be a virtual project for IDEs. 140# It won't actually build correctly since it is missing the shared.cmake integration. 141add_library(RxCpp SHARED ${RX_SOURCES}) 142SET_TARGET_PROPERTIES(RxCpp PROPERTIES LINKER_LANGUAGE CXX) 143endif (MSVC) 144 145set(CMAKE_SKIP_INSTALL_ALL_DEPENDENCY TRUE CACHE BOOL "Don't require all projects to be built in order to install" FORCE) 146 147install(DIRECTORY ${RXCPP_DIR}/Rx/v2/src/rxcpp/ DESTINATION include/rxcpp 148 FILES_MATCHING PATTERN "*.hpp") 149