From c9dc9335e94edee7ef752cfdcbbe7f9800bf48bd Mon Sep 17 00:00:00 2001 From: Tobias Peters Date: Fri, 5 Jul 2024 11:48:42 +0000 Subject: [PATCH 1/2] set project with version in nel and snowballs subproject --- CMakeLists.txt | 14 +++++++++----- nel/CMakeLists.txt | 8 ++++++++ snowballs2/CMakeLists.txt | 4 ++++ 3 files changed, 21 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index be0aa89af0..e61b56b045 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,6 +34,10 @@ IF(COMMAND cmake_policy) IF(POLICY CMP0020) CMAKE_POLICY(SET CMP0020 NEW) ENDIF() + + IF (POLICY CMP0048) + cmake_policy(SET CMP0048 NEW) + ENDIF () ENDIF() @@ -81,11 +85,11 @@ ELSE() SET(CURRENT_YEAR "2019") ENDIF() -PROJECT(RyzomCore CXX C) -SET(NL_VERSION_MAJOR 4) -SET(NL_VERSION_MINOR 1) -SET(NL_VERSION_PATCH 0 CACHE STRING "Patch version") -SET(NL_VERSION_BUILD 0 CACHE STRING "Build number") +PROJECT(RyzomCore VERSION 4.1.0.0 LANGUAGES CXX C) +SET(NL_VERSION_MAJOR ${RyzomCore_VERSION_MAJOR}) +SET(NL_VERSION_MINOR ${RyzomCore_VERSION_MINOR}) +SET(NL_VERSION_PATCH ${RyzomCore_VERSION_PATCH} CACHE STRING "Patch version") +SET(NL_VERSION_BUILD ${RyzomCore_VERSION_TWEAK} CACHE STRING "Build number") SET(YEAR "2001-${CURRENT_YEAR}") SET(AUTHOR "Winch Gate and The Ryzom Core Community") diff --git a/nel/CMakeLists.txt b/nel/CMakeLists.txt index e080c640c2..1392c6dbd2 100644 --- a/nel/CMakeLists.txt +++ b/nel/CMakeLists.txt @@ -1,3 +1,11 @@ +IF (COMMAND cmake_policy) + IF (POLICY CMP0048) + cmake_policy(SET CMP0048 NEW) + ENDIF () +ENDIF () + +project(NeL VERSION ${RyzomCore_VERSION} LANGUAGES CXX C) + IF(WITH_STATIC_DRIVERS) ADD_DEFINITIONS(-DNL_STATIC) ENDIF() diff --git a/snowballs2/CMakeLists.txt b/snowballs2/CMakeLists.txt index 368754236a..543dc5062c 100644 --- a/snowballs2/CMakeLists.txt +++ b/snowballs2/CMakeLists.txt @@ -1,3 +1,7 @@ +cmake_minimum_required(VERSION 3.27) + +project(Snowballs VERSION 2.0.0 LANGUAGES CXX) + IF(WIN32) SET(SNOWBALLS_CONFIG_FILE "." CACHE FILEPATH "Snowballs config file location") ELSE() From 8abd54de40b6e56bd839d76f0cd15f60b050c210 Mon Sep 17 00:00:00 2001 From: Tobias Peters Date: Fri, 5 Jul 2024 13:47:19 +0000 Subject: [PATCH 2/2] adjust path according to subproject location --- nel/tools/nel_unit_test/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nel/tools/nel_unit_test/CMakeLists.txt b/nel/tools/nel_unit_test/CMakeLists.txt index 6abc06a490..7e26a24981 100644 --- a/nel/tools/nel_unit_test/CMakeLists.txt +++ b/nel/tools/nel_unit_test/CMakeLists.txt @@ -8,6 +8,6 @@ TARGET_LINK_LIBRARIES(nel_unit_test ${CPPTEST_LIBRARIES} nelmisc nelnet nelligo) NL_DEFAULT_PROPS(nel_unit_test "Unit Tests") NL_ADD_RUNTIME_FLAGS(nel_unit_test) -ADD_DEFINITIONS(-DNEL_UNIT_BASE="${PROJECT_SOURCE_DIR}/nel/tools/nel_unit_test/") +ADD_DEFINITIONS(-DNEL_UNIT_BASE="${PROJECT_SOURCE_DIR}/tools/nel_unit_test/") INSTALL(TARGETS nel_unit_test RUNTIME DESTINATION ${NL_BIN_PREFIX})