From 26f415f5db46899e60135b25b750a448be5112bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Thu, 19 Mar 2015 22:42:03 +0100 Subject: [PATCH] core: move definitions with version and license in root CMakeLists.txt --- CMakeLists.txt | 8 ++++++++ src/CMakeLists.txt | 7 ------- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b94424e9e..23ba0110f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -46,6 +46,14 @@ endif() # license set(LICENSE "GPL3") +# add definitions for version and license +if(COMMAND cmake_policy) + cmake_policy(SET CMP0005 NEW) + add_definitions(-DWEECHAT_VERSION="${VERSION}" -DWEECHAT_LICENSE="${LICENSE}") +else() + add_definitions(-DWEECHAT_VERSION='"${VERSION}"' -DWEECHAT_LICENSE='"${LICENSE}"') +endif() + # package string set(PKG_STRING "${PROJECT_NAME} ${VERSION}") string(REPLACE "\";\"" "\ " PKG_STRING ${PKG_STRING}) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 516b3b0fb..b044f8b96 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -19,13 +19,6 @@ # along with WeeChat. If not, see . # -if(COMMAND cmake_policy) - cmake_policy(SET CMP0005 NEW) - add_definitions(-DWEECHAT_VERSION="${VERSION}" -DWEECHAT_LICENSE="${LICENSE}") -else() - add_definitions(-DWEECHAT_VERSION='"${VERSION}"' -DWEECHAT_LICENSE='"${LICENSE}"') -endif() - add_subdirectory(core) list(APPEND STATIC_LIBS weechat_core)