diff --git a/CMakeLists.txt b/CMakeLists.txt index ecbb3df47..3eb78938e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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() diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 0f5747aeb..ea0ef1225 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -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) diff --git a/src/plugins/relay/CMakeLists.txt b/src/plugins/relay/CMakeLists.txt index a01d67176..adb390682 100644 --- a/src/plugins/relay/CMakeLists.txt +++ b/src/plugins/relay/CMakeLists.txt @@ -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()