mirror of
https://github.com/weechat/weechat.git
synced 2026-06-12 14:14:48 +02:00
cmake: move zstd/cjson include handling
Move the respective include_directories() stansas to the top-level cmakefile. While this technically adds them to targets where they are not needed, there is no harm is having them. This maskes the find_dependency/use_includes/use_libs more consistent across the board and helps it stand out where it's forgotten. Fixes for which will be coming at a later date. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
This commit is contained in:
committed by
Sébastien Helleu
parent
c8d2b4448a
commit
6442b938eb
@@ -263,6 +263,7 @@ list(APPEND EXTRA_LIBS ${ZLIB_LIBRARY})
|
||||
# Check for zstd
|
||||
if(ENABLE_ZSTD)
|
||||
pkg_check_modules(LIBZSTD REQUIRED libzstd)
|
||||
include_directories(${LIBZSTD_INCLUDE_DIRS})
|
||||
list(APPEND EXTRA_LIBS ${LIBZSTD_LDFLAGS})
|
||||
add_definitions(-DHAVE_ZSTD)
|
||||
endif()
|
||||
@@ -270,6 +271,7 @@ endif()
|
||||
# Check for cJSON
|
||||
if(ENABLE_CJSON)
|
||||
pkg_check_modules(LIBCJSON REQUIRED libcjson)
|
||||
include_directories(${LIBCJSON_INCLUDE_DIRS})
|
||||
add_definitions(-DHAVE_CJSON)
|
||||
endif()
|
||||
|
||||
|
||||
@@ -81,14 +81,6 @@ set(LIB_CORE_SRC
|
||||
include(CheckSymbolExists)
|
||||
check_symbol_exists(flock "sys/file.h" HAVE_FLOCK)
|
||||
|
||||
if(ENABLE_ZSTD)
|
||||
include_directories(${LIBZSTD_INCLUDE_DIRS})
|
||||
endif()
|
||||
|
||||
if(ENABLE_CJSON)
|
||||
include_directories(${LIBCJSON_INCLUDE_DIRS})
|
||||
endif()
|
||||
|
||||
include_directories("${CMAKE_BINARY_DIR}")
|
||||
add_library(weechat_core OBJECT ${LIB_CORE_SRC})
|
||||
target_link_libraries(weechat_core coverage_config)
|
||||
|
||||
@@ -70,12 +70,10 @@ list(APPEND LINK_LIBS ${LIBGCRYPT_LDFLAGS})
|
||||
list(APPEND LINK_LIBS ${ZLIB_LIBRARY})
|
||||
|
||||
if(ENABLE_ZSTD)
|
||||
include_directories(${LIBZSTD_INCLUDE_DIRS})
|
||||
list(APPEND LINK_LIBS ${LIBZSTD_LDFLAGS})
|
||||
endif()
|
||||
|
||||
if(ENABLE_CJSON)
|
||||
include_directories(${LIBCJSON_INCLUDE_DIRS})
|
||||
list(APPEND LINK_LIBS ${LIBCJSON_LDFLAGS})
|
||||
endif()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user