summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 04:23:18 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 04:23:18 +0000
commitb90161ccd3b318f3314a23cb10c387651ad35831 (patch)
treea47dc087160299ce02d728cbf031d84af6281537 /CMakeLists.txt
parentAdding upstream version 2.1.30. (diff)
downloadlibyang2-upstream.tar.xz
libyang2-upstream.zip
Adding upstream version 2.1.148.upstream/2.1.148upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt32
1 files changed, 18 insertions, 14 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6470ce3..ee7d21f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -61,12 +61,12 @@ set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
# set version of the project
set(LIBYANG_MAJOR_VERSION 2)
set(LIBYANG_MINOR_VERSION 1)
-set(LIBYANG_MICRO_VERSION 30)
+set(LIBYANG_MICRO_VERSION 148)
set(LIBYANG_VERSION ${LIBYANG_MAJOR_VERSION}.${LIBYANG_MINOR_VERSION}.${LIBYANG_MICRO_VERSION})
# set version of the library
set(LIBYANG_MAJOR_SOVERSION 2)
-set(LIBYANG_MINOR_SOVERSION 29)
-set(LIBYANG_MICRO_SOVERSION 2)
+set(LIBYANG_MINOR_SOVERSION 46)
+set(LIBYANG_MICRO_SOVERSION 3)
set(LIBYANG_SOVERSION_FULL ${LIBYANG_MAJOR_SOVERSION}.${LIBYANG_MINOR_SOVERSION}.${LIBYANG_MICRO_SOVERSION})
set(LIBYANG_SOVERSION ${LIBYANG_MAJOR_SOVERSION})
@@ -103,6 +103,7 @@ set(type_plugins
src/plugins_types/ipv4_prefix.c
src/plugins_types/ipv6_prefix.c
src/plugins_types/date_and_time.c
+ src/plugins_types/hex_string.c
src/plugins_types/xpath1.0.c
src/plugins_types/node_instanceid.c)
@@ -110,6 +111,7 @@ set(libsrc
src/common.c
src/log.c
src/hash_table.c
+ src/dict.c
src/set.c
src/path.c
src/diff.c
@@ -159,6 +161,7 @@ set(libsrc
set(headers
src/context.h
+ src/hash_table.h
src/dict.h
src/in.h
src/libyang.h
@@ -181,7 +184,7 @@ set(headers
set(internal_headers
src/common.h
src/diff.h
- src/hash_table.h
+ src/hash_table_internal.h
src/in_internal.h
src/json.h
src/lyb.h
@@ -314,7 +317,7 @@ endif()
if ("${BUILD_TYPE_UPPER}" STREQUAL "DEBUG")
# enable before adding tests to let them detect that format checking is available - one of the tests is format checking
- source_format_enable(0.76)
+ source_format_enable(0.77)
endif()
# generate files
@@ -337,9 +340,14 @@ use_compat()
# create static libyang library
if(ENABLE_STATIC)
add_definitions(-DSTATIC)
- set(CMAKE_EXE_LINKER_FLAGS -static)
- set(CMAKE_FIND_LIBRARY_SUFFIXES .a)
+
+ # allow binaries compilation linking both static and dynamic libraries never linking static glibc
+ #set(CMAKE_EXE_LINKER_FLAGS -static)
+
+ # prefer static libraries
+ set(CMAKE_FIND_LIBRARY_SUFFIXES .a;.so)
set(CMAKE_LINK_SEARCH_START_STATIC TRUE)
+
set(CMAKE_EXE_LINK_DYNAMIC_C_FLAGS) # remove -Wl,-Bdynamic
set(CMAKE_EXE_LINK_DYNAMIC_CXX_FLAGS)
add_library(yang STATIC ${libsrc} ${compatsrc})
@@ -382,19 +390,15 @@ endif()
set_target_properties(yang PROPERTIES VERSION ${LIBYANG_SOVERSION_FULL} SOVERSION ${LIBYANG_SOVERSION})
+# link math
if(NOT WIN32)
- # link math
target_link_libraries(yang m)
endif()
# find pthreads
set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
find_package(Threads REQUIRED)
-if(ENABLE_STATIC)
- target_link_libraries(yang -Wl,--whole-archive ${CMAKE_THREAD_LIBS_INIT} -Wl,--no-whole-archive)
-else()
- target_link_libraries(yang ${CMAKE_THREAD_LIBS_INIT})
-endif()
+target_link_libraries(yang ${CMAKE_THREAD_LIBS_INIT})
# find PCRE2 library
unset(PCRE2_LIBRARY CACHE)
@@ -459,7 +463,7 @@ gen_doc("${doxy_files}" ${LIBYANG_VERSION} ${LIBYANG_DESCRIPTION} ${project_logo
# generate API/ABI report
if ("${BUILD_TYPE_UPPER}" STREQUAL "ABICHECK")
- lib_abi_check(yang "${headers}" ${LIBYANG_SOVERSION_FULL} 003fa46e190930912e4d3f7b178c671c0662f671)
+ lib_abi_check(yang "${headers}" ${LIBYANG_SOVERSION_FULL} 8b787ba8edf21556c8845722587ac8036400150a)
endif()
# source code format target for Makefile