|
| 1 | +# Copyright (C) 2024 by Skyward |
| 2 | +# |
| 3 | +# This program is free software; you can redistribute it and/or |
| 4 | +# it under the terms of the GNU General Public License as published |
| 5 | +# the Free Software Foundation; either version 2 of the License, or |
| 6 | +# (at your option) any later version. |
| 7 | +# |
| 8 | +# This program is distributed in the hope that it will be useful, |
| 9 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 11 | +# GNU General Public License for more details. |
| 12 | +# |
| 13 | +# As a special exception, if other files instantiate templates or use |
| 14 | +# macros or inline functions from this file, or you compile this file |
| 15 | +# and link it with other works to produce a work based on this file, |
| 16 | +# this file does not by itself cause the resulting work to be covered |
| 17 | +# by the GNU General Public License. However the source code for this |
| 18 | +# file must still be made available in accordance with the GNU |
| 19 | +# Public License. This exception does not invalidate any other |
| 20 | +# why a work based on this file might be covered by the GNU General |
| 21 | +# Public License. |
| 22 | +# |
| 23 | +# You should have received a copy of the GNU General Public License |
| 24 | +# along with this program; if not, see <http://www.gnu.org/licenses/> |
| 25 | + |
| 26 | +cmake_minimum_required(VERSION 3.16) |
| 27 | + |
| 28 | +project(TsCpp |
| 29 | + DESCRIPTION "Trivial serialization for C++" |
| 30 | + LANGUAGES CXX |
| 31 | +) |
| 32 | + |
| 33 | +add_library(tscpp INTERFACE) |
| 34 | +target_sources(tscpp INTERFACE src/tscpp/buffer.cpp src/tscpp/stream.cpp) |
| 35 | +target_include_directories(tscpp INTERFACE include) |
| 36 | + |
| 37 | +add_executable(1_stream_known examples/1_stream_known.cpp) |
| 38 | +target_link_libraries(1_stream_known tscpp) |
| 39 | + |
| 40 | +add_executable(2_stream_unknown examples/2_stream_unknown.cpp) |
| 41 | +target_link_libraries(2_stream_unknown tscpp) |
| 42 | + |
| 43 | +add_executable(3_buffer_known examples/3_buffer_known.cpp) |
| 44 | +target_link_libraries(3_buffer_known tscpp) |
| 45 | + |
| 46 | +add_executable(4_buffer_unknown examples/4_buffer_unknown.cpp) |
| 47 | +target_link_libraries(4_buffer_unknown tscpp) |
| 48 | + |
| 49 | +add_executable(5_stream_failtest examples/5_stream_failtest.cpp) |
| 50 | +target_link_libraries(5_stream_failtest tscpp) |
| 51 | + |
| 52 | +add_executable(6_buffer_failtest examples/6_buffer_failtest.cpp) |
| 53 | +target_link_libraries(6_buffer_failtest tscpp) |
0 commit comments