core: move definitions with version and license in root CMakeLists.txt

v2.8-utf8proc
Sébastien Helleu 2015-03-19 22:42:03 +01:00
parent 6c4b574945
commit 26f415f5db
2 changed files with 8 additions and 7 deletions

View File

@ -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})

View File

@ -19,13 +19,6 @@
# along with WeeChat. If not, see <http://www.gnu.org/licenses/>.
#
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)