From 2bb2a5e2f50da3b4af849122ce0cce4f0b5fd62d Mon Sep 17 00:00:00 2001 From: Gioacchino Mazzurco Date: Thu, 9 Dec 2021 13:04:06 +0100 Subject: [PATCH] Initial CMake support for libretroshare libretroshare (not all build options yet) and it's dependencies can now be built using CMake instead of qmake. Even Qt itself deprecated qmake, which is not developed anymore, as build system and it was making many things much more difficult and requiring an enormous amount of black magic to support a wide range of platforms. libretroshare can now easly be build as static or shared library with simple commands and a maintaniable build system: ``` cmake \ -D RS_LIBRETROSHARE_STATIC=OFF -D RS_LIBRETROSHARE_SHARED=ON \ -S $YOUR_RS_SOURCE_DIR/libretroshare/ -B . make ``` --- CMakeLists.txt | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..2a996de --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,19 @@ +# RetroShare decentralized communication platform +# +# Copyright (C) 2021 Gioacchino Mazzurco +# Copyright (C) 2021 Asociación Civil Altermundi +# +# SPDX-License-Identifier: CC0-1.0 + +cmake_minimum_required (VERSION 2.8.12) +project(libbitdht) + +file( + GLOB BITDHT_SOURCES + src/bitdht/*.c src/bitdht/*.cc src/udp/*.cc src/util/*.cc ) + +add_library(${PROJECT_NAME} ${BITDHT_SOURCES}) + +target_include_directories( + ${PROJECT_NAME} + PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/src )