From 21cc85064cd2f3ff13db6019487475a0a7200de0 Mon Sep 17 00:00:00 2001 From: levlam Date: Sun, 13 Jun 2021 05:51:38 +0300 Subject: [PATCH] Do not export symbols from executable on Linux with CMake 3.4+. --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 45de0b3..65eee35 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,11 @@ cmake_minimum_required(VERSION 3.0.2 FATAL_ERROR) +if (POLICY CMP0065) + # do not export symbols from executables + # affects compiler checks in project(), so must be set before it + cmake_policy(SET CMP0065 NEW) +endif() + project(TelegramBotApi VERSION 5.2 LANGUAGES CXX) add_subdirectory(td EXCLUDE_FROM_ALL)