summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake')
-rw-r--r--cmake/external/lua54/0001-Add-an-install-static-target.patch (renamed from cmake/external/lua52/0001-Add-an-install-static-target.patch)0
-rw-r--r--cmake/external/lua54/Lua54.cmake (renamed from cmake/external/lua52/Lua52.cmake)16
-rw-r--r--cmake/modules/FindAMRNB.cmake10
-rw-r--r--cmake/modules/FindAsciidoctor.cmake69
-rw-r--r--cmake/modules/FindLibXml2.cmake7
-rw-r--r--cmake/modules/FindLua.cmake13
-rw-r--r--cmake/modules/FindMinizip.cmake24
-rw-r--r--cmake/modules/FindMinizipng.cmake117
-rw-r--r--cmake/modules/FindSinsp.cmake146
-rw-r--r--cmake/modules/FindWSWinLibs.cmake2
-rw-r--r--cmake/modules/FindXSLTPROC.cmake4
-rw-r--r--cmake/modules/FindZLIB.cmake18
-rw-r--r--cmake/modules/FindZLIBNG.cmake130
-rw-r--r--cmake/modules/UseAsn2Wrs.cmake2
-rw-r--r--cmake/modules/UseCheckAPI.cmake2
-rw-r--r--cmake/modules/UseCustomIncludes.cmake2
-rw-r--r--cmake/modules/UseLemon.cmake3
-rw-r--r--cmake/modules/readme.txt3
18 files changed, 457 insertions, 111 deletions
diff --git a/cmake/external/lua52/0001-Add-an-install-static-target.patch b/cmake/external/lua54/0001-Add-an-install-static-target.patch
index 0f161925..0f161925 100644
--- a/cmake/external/lua52/0001-Add-an-install-static-target.patch
+++ b/cmake/external/lua54/0001-Add-an-install-static-target.patch
diff --git a/cmake/external/lua52/Lua52.cmake b/cmake/external/lua54/Lua54.cmake
index 864f2235..53f23b8e 100644
--- a/cmake/external/lua52/Lua52.cmake
+++ b/cmake/external/lua54/Lua54.cmake
@@ -23,10 +23,12 @@ set(LUA_INCLUDE_DIRS "${_staging_dir}/include")
set(LUA_LIBRARIES "${_staging_dir}/lib/liblua.a")
set(LUA_FOUND TRUE CACHE INTERNAL "")
set(Lua_FOUND TRUE CACHE INTERNAL "")
+# Fresh Lua 5.3+ install always has 64-bit lua_Integers (unlike Lua 5.2)
+set(LUA_INTEGER_SIZE 8 CACHE INTERNAL "Size of lua_Integer")
-set(_lua52_cflags "-fPIC")
+set(_lua54_cflags "-fPIC")
if(APPLE)
- set(_lua52_cflags "${lua52_cflags} -isysroot ${CMAKE_OSX_SYSROOT}")
+ set(_lua54_cflags "${lua54_cflags} -isysroot ${CMAKE_OSX_SYSROOT}")
endif()
#
@@ -34,13 +36,13 @@ endif()
# external projects to a staging directory first, and the normal install target
# does not work with MinGW.
#
-ExternalProject_Add(lua52
- URL https://gitlab.com/wireshark/wireshark-development-libraries/-/raw/main/public/src/lua/lua-5.2.4.tar.gz
- URL https://www.lua.org/ftp/lua-5.2.4.tar.gz
- URL_HASH SHA256=b9e2e4aad6789b3b63a056d442f7b39f0ecfca3ae0f1fc0ae4e9614401b69f4b
+ExternalProject_Add(lua54
+ URL https://gitlab.com/wireshark/wireshark-development-libraries/-/raw/main/public/src/lua/lua-5.4.6.tar.gz
+ URL https://www.lua.org/ftp/lua-5.4.6.tar.gz
+ URL_HASH SHA256=7d5ea1b9cb6aa0b59ca3dde1c6adcb57ef83a1ba8e5432c0ecd06bf439b3ad88
PATCH_COMMAND patch -p1 < ${CMAKE_CURRENT_LIST_DIR}/0001-Add-an-install-static-target.patch
CONFIGURE_COMMAND ""
- BUILD_COMMAND ${MAKE_EXE} MYCFLAGS=${_lua52_cflags} CC=${CMAKE_C_COMPILER} AR=${CMAKE_AR}\ rcu RANLIB=${CMAKE_RANLIB} ${_target}
+ BUILD_COMMAND ${MAKE_EXE} MYCFLAGS=${_lua54_cflags} CC=${CMAKE_C_COMPILER} AR=${CMAKE_AR}\ rcu RANLIB=${CMAKE_RANLIB} ${_target}
BUILD_IN_SOURCE True
BUILD_BYPRODUCTS ${LUA_LIBRARIES}
INSTALL_COMMAND ${MAKE_EXE} INSTALL_TOP=${_staging_dir} install-static
diff --git a/cmake/modules/FindAMRNB.cmake b/cmake/modules/FindAMRNB.cmake
index f8928ca8..4c5babe2 100644
--- a/cmake/modules/FindAMRNB.cmake
+++ b/cmake/modules/FindAMRNB.cmake
@@ -7,7 +7,7 @@
# AMRNB_DLL - (Windows) Name of the amrnb DLL
include( FindWSWinLibs )
-FindWSWinLibs( "opencore-amrnb-.*" "AMRNB_HINTS" )
+FindWSWinLibs( "opencore-amr-.*" "AMRNB_HINTS" )
if (NOT USE_REPOSITORY)
find_package(PkgConfig)
@@ -23,7 +23,7 @@ find_path( AMRNB_INCLUDE_DIR
)
find_library( AMRNB_LIBRARY
- NAMES opencore-amrnb
+ NAMES opencore-amrnb libopencore-amrnb-0
HINTS
"${PC_AMRNB_LIBDIRS}"
"${AMRNB_HINTS}/lib"
@@ -38,14 +38,14 @@ if( AMRNB_FOUND )
set( AMRNB_LIBRARIES ${AMRNB_LIBRARY} )
if (WIN32)
set ( AMRNB_DLL_DIR "${AMRNB_HINTS}/bin"
- CACHE PATH "Path to amrnb DLL"
+ CACHE PATH "Path to the AMR-NB DLL"
)
file( GLOB _amrnb_dll RELATIVE "${AMRNB_DLL_DIR}"
- "${AMRNB_DLL_DIR}/libamrnb.dll"
+ "${AMRNB_DLL_DIR}/libopencore-amrnb-0.dll"
)
set ( AMRNB_DLL ${_amrnb_dll}
# We're storing filenames only. Should we use STRING instead?
- CACHE FILEPATH "amrnb DLL file name"
+ CACHE FILEPATH "AMR NB-DLL file name"
)
mark_as_advanced( AMRNB_DLL_DIR AMRNB_DLL )
endif()
diff --git a/cmake/modules/FindAsciidoctor.cmake b/cmake/modules/FindAsciidoctor.cmake
index b317117a..62533788 100644
--- a/cmake/modules/FindAsciidoctor.cmake
+++ b/cmake/modules/FindAsciidoctor.cmake
@@ -41,17 +41,18 @@ if(ASCIIDOCTOR_EXECUTABLE)
endfunction(set_asciidoctor_target_properties)
set (_asciidoctor_common_args
- # Doesn't work with AsciidoctorJ?
+ # AsciidoctorJ added --failure-level in version 2.5.6
# --failure-level=WARN
# --trace
--quiet
- --attribute build_dir=${CMAKE_BINARY_DIR}/docbook
- --require ${CMAKE_SOURCE_DIR}/docbook/asciidoctor-macros/ws_utils.rb
- --require ${CMAKE_SOURCE_DIR}/docbook/asciidoctor-macros/commaize-block.rb
- --require ${CMAKE_SOURCE_DIR}/docbook/asciidoctor-macros/cveidlink-inline-macro.rb
- --require ${CMAKE_SOURCE_DIR}/docbook/asciidoctor-macros/manarg-block.rb
- --require ${CMAKE_SOURCE_DIR}/docbook/asciidoctor-macros/wsbuglink-inline-macro.rb
- --require ${CMAKE_SOURCE_DIR}/docbook/asciidoctor-macros/wssalink-inline-macro.rb
+ --attribute build_dir=${CMAKE_BINARY_DIR}/doc
+ --attribute css_dir=${CMAKE_SOURCE_DIR}/doc
+ --require ${CMAKE_SOURCE_DIR}/doc/asciidoctor-macros/ws_utils.rb
+ --require ${CMAKE_SOURCE_DIR}/doc/asciidoctor-macros/commaize-block.rb
+ --require ${CMAKE_SOURCE_DIR}/doc/asciidoctor-macros/cveidlink-inline-macro.rb
+ --require ${CMAKE_SOURCE_DIR}/doc/asciidoctor-macros/manarg-block.rb
+ --require ${CMAKE_SOURCE_DIR}/doc/asciidoctor-macros/wsbuglink-inline-macro.rb
+ --require ${CMAKE_SOURCE_DIR}/doc/asciidoctor-macros/wssalink-inline-macro.rb
)
set(_asciidoctor_common_command
@@ -78,7 +79,7 @@ if(ASCIIDOCTOR_EXECUTABLE)
--out-file ${_output_xml}
${CMAKE_CURRENT_SOURCE_DIR}/${_asciidocsource}
DEPENDS
- ${CMAKE_SOURCE_DIR}/docbook/attributes.adoc
+ ${CMAKE_SOURCE_DIR}/doc/attributes.adoc
${CMAKE_CURRENT_SOURCE_DIR}/${_asciidocsource}
${ARGN}
)
@@ -110,7 +111,7 @@ if(ASCIIDOCTOR_EXECUTABLE)
--out-file ${_output_html}
${CMAKE_CURRENT_SOURCE_DIR}/${_asciidocsource}
DEPENDS
- ${CMAKE_SOURCE_DIR}/docbook/attributes.adoc
+ ${CMAKE_SOURCE_DIR}/doc/attributes.adoc
${CMAKE_CURRENT_SOURCE_DIR}/${_asciidocsource}
${ARGN}
)
@@ -121,34 +122,34 @@ if(ASCIIDOCTOR_EXECUTABLE)
MACRO( ASCIIDOCTOR2TXT _asciidocsource )
GET_FILENAME_COMPONENT( _source_base_name ${_asciidocsource} NAME_WE )
- set( _output_html ${_source_base_name}.html )
+ set( _input_html ${_source_base_name}.html )
set( _output_txt ${_source_base_name}.txt )
ADD_CUSTOM_COMMAND(
OUTPUT
${_output_txt}
COMMAND ${Python3_EXECUTABLE} ${CMAKE_SOURCE_DIR}/tools/html2text.py
- ${_output_html}
+ ${_input_html}
> ${_output_txt}
DEPENDS
${MAN_INCLUDES}
- ${CMAKE_SOURCE_DIR}/docbook/attributes.adoc
+ ${CMAKE_SOURCE_DIR}/doc/attributes.adoc
${CMAKE_CURRENT_SOURCE_DIR}/${_asciidocsource}
- ${_output_html}
+ ${_input_html}
${ARGN}
)
- unset(_output_html)
+ unset(_input_html)
unset(_output_txt)
ENDMACRO()
# Generate one or more ROFF man pages
- MACRO(ASCIIDOCTOR2ROFFMAN _man_section)
+ function(ASCIIDOCTOR2ROFFMAN _man_section)
set(_input_adoc)
set(_output_man)
foreach(_src_file ${ARGN})
list(APPEND _input_adoc ${_src_file})
GET_FILENAME_COMPONENT(_source_base_name ${_src_file} NAME_WE )
- list(APPEND _output_man ${_source_base_name}.${_man_section} )
+ list(APPEND _output_man man_pages/${_source_base_name}.${_man_section} )
endforeach()
ADD_CUSTOM_COMMAND(
@@ -156,26 +157,23 @@ if(ASCIIDOCTOR_EXECUTABLE)
${_output_man}
COMMAND ${_asciidoctor_common_command}
--backend manpage
- --destination-dir ${CMAKE_CURRENT_BINARY_DIR}
+ --destination-dir ${CMAKE_CURRENT_BINARY_DIR}/man_pages
${_input_adoc}
DEPENDS
${MAN_INCLUDES}
- ${CMAKE_SOURCE_DIR}/docbook/attributes.adoc
+ ${CMAKE_SOURCE_DIR}/doc/attributes.adoc
${_input_adoc}
)
- unset(_src_file)
- unset(_input_adoc)
- unset(_output_man)
- ENDMACRO()
+ endfunction()
# Generate one or more HTML man pages
- MACRO(ASCIIDOCTOR2HTMLMAN)
+ function(ASCIIDOCTOR2HTMLMAN)
set(_input_adoc)
set(_output_man)
foreach(_src_file ${ARGN})
list(APPEND _input_adoc ${_src_file})
GET_FILENAME_COMPONENT(_source_base_name ${_src_file} NAME_WE )
- list(APPEND _output_man ${_source_base_name}.html )
+ list(APPEND _output_man man_pages/${_source_base_name}.html )
endforeach()
ADD_CUSTOM_COMMAND(
@@ -183,24 +181,19 @@ if(ASCIIDOCTOR_EXECUTABLE)
${_output_man}
COMMAND ${_asciidoctor_common_command}
--backend html
- --destination-dir ${CMAKE_CURRENT_BINARY_DIR}
+ --destination-dir ${CMAKE_CURRENT_BINARY_DIR}/man_pages
${_input_adoc}
DEPENDS
${MAN_INCLUDES}
- ${CMAKE_SOURCE_DIR}/docbook/attributes.adoc
+ ${CMAKE_SOURCE_DIR}/doc/attributes.adoc
${_input_adoc}
)
- unset(_src_file)
- unset(_input_adoc)
- unset(_output_man)
- ENDMACRO()
-
- # news: release-notes.txt
- # ${CMAKE_COMMAND} -E copy_if_different release-notes.txt ../NEWS
+ endfunction()
FIND_PROGRAM(ASCIIDOCTOR_PDF_EXECUTABLE
NAMES
asciidoctorj
+ asciidoctor-pdf.bat
asciidoctor-pdf
PATHS
/bin
@@ -230,9 +223,12 @@ if(ASCIIDOCTOR_EXECUTABLE)
${_output_pdf}
COMMAND ${_asciidoctor_pdf_common_command}
--out-file "${_output_pdf}"
+ -a pdf-fontsdir=${CMAKE_SOURCE_DIR}/resources/fonts
+ -a pdf-themesdir=${CMAKE_SOURCE_DIR}/doc/asciidoctor-themes
+ -a pdf-theme=wsug
${CMAKE_CURRENT_SOURCE_DIR}/${_asciidocsource}
DEPENDS
- ${CMAKE_SOURCE_DIR}/docbook/attributes.adoc
+ ${CMAKE_SOURCE_DIR}/doc/attributes.adoc
${CMAKE_CURRENT_SOURCE_DIR}/${_asciidocsource}
${ARGN}
VERBATIM
@@ -253,6 +249,7 @@ if(ASCIIDOCTOR_EXECUTABLE)
FIND_PROGRAM(ASCIIDOCTOR_EPUB_EXECUTABLE
NAMES
asciidoctorj
+ asciidoctor-epub3.bat
asciidoctor-epub3
PATHS
/bin
@@ -283,7 +280,7 @@ if(ASCIIDOCTOR_EXECUTABLE)
--out-file "${_output_epub}"
${CMAKE_CURRENT_SOURCE_DIR}/${_asciidocsource}
DEPENDS
- ${CMAKE_SOURCE_DIR}/docbook/attributes.adoc
+ ${CMAKE_SOURCE_DIR}/doc/attributes.adoc
${CMAKE_CURRENT_SOURCE_DIR}/${_asciidocsource}
${ARGN}
VERBATIM
diff --git a/cmake/modules/FindLibXml2.cmake b/cmake/modules/FindLibXml2.cmake
index f3e47629..d36b390b 100644
--- a/cmake/modules/FindLibXml2.cmake
+++ b/cmake/modules/FindLibXml2.cmake
@@ -66,6 +66,11 @@ find_path(LIBXML2_INCLUDE_DIR NAMES libxml/xpath.h
PATH_SUFFIXES libxml2
)
+find_path(ICONV_INCLUDE_DIR NAMES iconv.h
+ HINTS
+ ${LIBXML2_HINTS}/include
+ )
+
# CMake 3.9 and below used 'LIBXML2_LIBRARIES' as the name of
# the cache entry storing the find_library result. Use the
# value if it was set by the project or user.
@@ -98,7 +103,7 @@ elseif(LIBXML2_INCLUDE_DIR AND EXISTS "${LIBXML2_INCLUDE_DIR}/libxml/xmlversion.
unset(libxml2_version_str)
endif()
-set(LIBXML2_INCLUDE_DIRS ${LIBXML2_INCLUDE_DIR} ${PC_LIBXML_INCLUDE_DIRS})
+set(LIBXML2_INCLUDE_DIRS ${LIBXML2_INCLUDE_DIR} ${PC_LIBXML_INCLUDE_DIRS} ${ICONV_INCLUDE_DIR})
set(LIBXML2_LIBRARIES ${LIBXML2_LIBRARY})
include(FindPackageHandleStandardArgs)
diff --git a/cmake/modules/FindLua.cmake b/cmake/modules/FindLua.cmake
index 23e50a6a..7bacfdd4 100644
--- a/cmake/modules/FindLua.cmake
+++ b/cmake/modules/FindLua.cmake
@@ -56,7 +56,7 @@ unset(_lua_append_versions)
# this is a function only to have all the variables inside go away automatically
function(_lua_get_versions)
set(LUA_VERSIONS5 ${LUA_FIND_VERSIONS})
- list(FILTER LUA_VERSIONS5 INCLUDE REGEX "5\.[21]")
+ list(FILTER LUA_VERSIONS5 INCLUDE REGEX "5\.[43]")
set(_lua_append_versions ${LUA_VERSIONS5})
message(STATUS "Considering the following Lua versions: ${_lua_append_versions}")
@@ -184,7 +184,7 @@ find_library(LUA_LIBRARY
HINTS
${LUA_HINTS}
ENV LUA_DIR
- PATH_SUFFIXES lib
+ PATH_SUFFIXES lib ${_lua_library_names}
)
unset(_lua_library_names)
@@ -220,6 +220,15 @@ cmake_policy(POP)
IF(Lua_FOUND)
SET( LUA_INCLUDE_DIRS ${LUA_INCLUDE_DIR} )
+
+ unset(HAVE_LUA_INTEGER_SIZE CACHE)
+ cmake_push_check_state()
+ include(CheckTypeSize)
+ set(CMAKE_REQUIRED_INCLUDES ${LUA_INCLUDE_DIR})
+ set(CMAKE_EXTRA_INCLUDE_FILES "luaconf.h")
+ check_type_size(LUA_INTEGER LUA_INTEGER_SIZE)
+ cmake_pop_check_state()
+
if (WIN32)
set ( LUA_DLL_DIR "${LUA_HINTS}" CACHE PATH "Path to Lua DLL")
file( GLOB _lua_dll RELATIVE "${LUA_DLL_DIR}" "${LUA_DLL_DIR}/lua*.dll")
diff --git a/cmake/modules/FindMinizip.cmake b/cmake/modules/FindMinizip.cmake
index b6d9c867..f85a06cd 100644
--- a/cmake/modules/FindMinizip.cmake
+++ b/cmake/modules/FindMinizip.cmake
@@ -7,7 +7,7 @@
# MINIZIP_DLL_DIR - (Windows) Path to the minizip DLL.
# MINIZIP_DLL - (Windows) Name of the minizip DLL.
-FindWSWinLibs( "minizip-*" "MINIZIP_HINTS" )
+FindWSWinLibs("minizip-[0-9]" "MINIZIP_HINTS")
if(NOT USE_REPOSITORY)
find_package(PkgConfig QUIET)
@@ -44,7 +44,8 @@ find_package_handle_standard_args(Minizip
if(MINIZIP_FOUND)
set(MINIZIP_LIBRARIES ${MINIZIP_LIBRARY})
set(MINIZIP_INCLUDE_DIRS ${MINIZIP_INCLUDE_DIR})
- SET(HAVE_MINIZIP ON)
+ set(HAVE_MINIZIP ON)
+
# Some distributions have minizip-ng code instead of the original zlib contrib
# library but keep the old minizip name (because minizip-ng is
# better maintained and provides a compatibility layer). However the
@@ -52,29 +53,30 @@ if(MINIZIP_FOUND)
# for renamed struct members to avoid an endless game of whack-a-mole.
include(CheckStructHasMember)
check_struct_has_member("zip_fileinfo" "dos_date" "minizip/zip.h" HAVE_MZCOMPAT_DOS_DATE)
- if (WIN32)
- set ( MINIZIP_DLL_DIR "${MINIZIP_HINTS}/bin"
+
+ if(WIN32)
+ set(MINIZIP_DLL_DIR "${MINIZIP_HINTS}/bin"
CACHE PATH "Path to Minizip DLL"
)
- file( GLOB _minizip_dll RELATIVE "${MINIZIP_DLL_DIR}"
+ file(GLOB _minizip_dll RELATIVE "${MINIZIP_DLL_DIR}"
"${MINIZIP_DLL_DIR}/minizip.dll"
)
- set ( MINIZIP_DLL ${_minizip_dll}
+ set(MINIZIP_DLL ${_minizip_dll}
CACHE FILEPATH "Minizip DLL file name"
)
- file( GLOB _minizip_pdb RELATIVE "${MINIZIP_DLL_DIR}"
+ file(GLOB _minizip_pdb RELATIVE "${MINIZIP_DLL_DIR}"
"${MINIZIP_DLL_DIR}/minizip.pdb"
)
- set ( MINIZIP_PDB ${_minizip_pdb}
+ set(MINIZIP_PDB ${_minizip_pdb}
CACHE FILEPATH "Minizip PDB file name"
)
- mark_as_advanced( MINIZIP_DLL_DIR MINIZIP_DLL MINIZIP_PDB )
+ mark_as_advanced(MINIZIP_DLL_DIR MINIZIP_DLL MINIZIP_PDB)
endif()
else()
set(MINIZIP_LIBRARIES)
set(MINIZIP_INCLUDE_DIRS)
- SET( MINIZIP_DLL_DIR )
- SET( MINIZIP_DLL )
+ set(MINIZIP_DLL_DIR)
+ set(MINIZIP_DLL)
endif()
mark_as_advanced(MINIZIP_LIBRARIES MINIZIP_INCLUDE_DIRS)
diff --git a/cmake/modules/FindMinizipng.cmake b/cmake/modules/FindMinizipng.cmake
new file mode 100644
index 00000000..653d6542
--- /dev/null
+++ b/cmake/modules/FindMinizipng.cmake
@@ -0,0 +1,117 @@
+#
+# - Find minizip-ng libraries
+#
+# MINIZIPNG_INCLUDE_DIRS - where to find minizip-ng headers.
+# MINIZIPNG_LIBRARIES - List of libraries when using minizip-ng.
+# MINIZIPNG_FOUND - True if minizip-ng is found.
+# MINIZIPNG_DLL_DIR - (Windows) Path to the minizip-ng DLL.
+# MINIZIPNG_DLLS - (Windows) Name of the minizip-ng DLL.
+
+FindWSWinLibs("minizip-ng" "MINIZIPNG_HINTS")
+
+if(NOT USE_REPOSITORY)
+ find_package(PkgConfig QUIET)
+ pkg_search_module(MINIZIPNG QUIET minizip-ng)
+endif()
+
+find_path(MINIZIPNG_INCLUDE_DIR
+ NAMES
+ mz_compat.h
+ minizip-ng/mz_compat.h
+ HINTS
+ ${MINIZIPNG_INCLUDE_DIRS}
+ "${MINIZIPNG_HINTS}/include"
+)
+
+get_filename_component(MINIZIPNG_PARENT_DIR ${MINIZIPNG_INCLUDE_DIR} DIRECTORY)
+if(EXISTS "${MINIZIPNG_PARENT_DIR}/minizip-ng/mz_compat.h")
+ set(MINIZIPNG_INCLUDE_DIR "${MINIZIPNG_PARENT_DIR}")
+endif()
+
+find_library(MINIZIPNG_LIBRARY
+ NAMES
+ libminizip-ng minizip-ng
+ HINTS
+ ${MINIZIPNG_LIBRARY_DIRS}
+ ${MINIZIPNG_HINTS}/lib
+ PATH
+ /opt
+ /opt/homebrew/lib
+)
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(Minizipng
+ REQUIRED_VARS MINIZIPNG_LIBRARY MINIZIPNG_INCLUDE_DIR
+ VERSION_VAR MINIZIPNG_VERSION)
+
+if(MINIZIPNG_FOUND)
+ set(MINIZIPNG_LIBRARIES ${MINIZIPNG_LIBRARY})
+
+ find_library(BZ2_LIBRARY
+ NAMES
+ bz2
+ HINTS
+ ${MINIZIPNG_LIBRARY_DIRS}
+ "${MINIZIPNG_HINTS}/lib"
+ )
+ list(APPEND MINIZIPNG_LIBRARIES ${BZ2_LIBRARY})
+
+ find_library(LZMA_LIBRARY
+ NAMES
+ lzma
+ HINTS
+ ${MINIZIPNG_LIBRARY_DIRS}
+ "${MINIZIPNG_HINTS}/lib"
+ )
+ list(APPEND MINIZIPNG_LIBRARIES ${LZMA_LIBRARY})
+
+ find_library(ZSTD_LIBRARY
+ NAMES
+ zstd
+ HINTS
+ ${MINIZIPNG_LIBRARY_DIRS}
+ "${MINIZIPNG_HINTS}/lib"
+ )
+ list(APPEND MINIZIPNG_LIBRARIES ${ZSTD_LIBRARY})
+
+ if(WIN32)
+ find_library(Bcrypt_LIBRARY
+ NAMES
+ Bcrypt
+ )
+
+ list(APPEND MINIZIPNG_LIBRARIES ${Bcrypt_LIBRARY})
+ endif()
+
+ # do we need openssl on *nix*
+
+ # message(STATUS "Minizip-ng, MINIZIPNG_LIBRARIES ${MINIZIPNG_LIBRARIES}")
+
+ set(MINIZIPNG_INCLUDE_DIRS ${MINIZIPNG_INCLUDE_DIR})
+ set(HAVE_MINIZIPNG ON)
+
+ # Some distributions have minizip-ng code instead of the original zlib contrib
+ # library but keep the old minizip name (because minizip-ng is
+ # better maintained and provides a compatibility layer). However the
+ # minizip-ng compatibility layer has some issues. We need to check
+ # for renamed struct members to avoid an endless game of whack-a-mole.
+ include(CheckStructHasMember)
+ check_struct_has_member("zip_fileinfo" "dos_date" "minizip-ng/zip.h" HAVE_MZCOMPAT_DOS_DATE)
+
+ if(WIN32)
+ set(MINIZIPNG_DLL_DIR "${MINIZIPNG_HINTS}/bin"
+ CACHE PATH "Path to Minizip DLL"
+ )
+
+ AddWSWinDLLS(MINIZIPNG MINIZIPNG_HINTS "bz2*" "zstd*")
+
+ mark_as_advanced(MINIZIPNG_DLL_DIR MINIZIPNG_DLLS MINIZIPNG_PDBS)
+ endif()
+else()
+ set(MINIZIPNG_LIBRARIES)
+ set(MINIZIPNG_INCLUDE_DIRS)
+ set(MINIZIPNG_DLL_DIR)
+ set(MINIZIPNG_DLLS)
+endif()
+
+mark_as_advanced(MINIZIPNG_LIBRARIES MINIZIPNG_INCLUDE_DIRS)
diff --git a/cmake/modules/FindSinsp.cmake b/cmake/modules/FindSinsp.cmake
index 9729b028..58126224 100644
--- a/cmake/modules/FindSinsp.cmake
+++ b/cmake/modules/FindSinsp.cmake
@@ -22,7 +22,7 @@
# SINSP_DLL - (Windows) Name of the libsinsp and libscap DLLs
include( FindWSWinLibs )
-FindWSWinLibs( "libsinsp-.*" "SINSP_HINTS" )
+FindWSWinLibs( "falcosecurity-libs-.*" SINSP_HINTS )
include(CMakeDependentOption)
@@ -31,29 +31,33 @@ if( NOT USE_REPOSITORY)
pkg_check_modules(SINSP libsinsp)
endif()
+# Include both legacy (#include <sinsp.h>) and current (#include <libsinsp/sinsp.h>) paths for now.
if(NOT SINSP_FOUND)
# pkg_check_modules didn't work, so look for ourselves.
- find_path(SINSP_INCLUDE_DIRS
- NAMES sinsp.h
+ find_path(_sinsp_include_dirs NO_CACHE
+ NAMES libsinsp/sinsp.h
HINTS "${SINSP_INCLUDEDIR}" "${SINSP_HINTS}/include"
- PATH_SUFFIXES falcosecurity/userspace/libsinsp
+ PATH_SUFFIXES falcosecurity
/usr/include
/usr/local/include
)
+ if(_sinsp_include_dirs)
+ list(APPEND _sinsp_include_dirs ${_sinsp_include_dirs}/libsinsp)
+ endif()
- find_path(_scap_include_dir
+ find_path(_scap_include_dir NO_CACHE
NAMES scap.h
HINTS "${SINSP_INCLUDEDIR}" "${SINSP_HINTS}/include"
- PATH_SUFFIXES falcosecurity/userspace/libscap
+ PATH_SUFFIXES falcosecurity/libscap
/usr/include
/usr/local/include
)
if(_scap_include_dir)
- list(APPEND SINSP_INCLUDE_DIRS _scap_include_dir)
+ list(APPEND _sinsp_include_dirs ${_scap_include_dir})
endif()
unset(_scap_include_dir)
- find_library(SINSP_LINK_LIBRARIES
+ find_library(_sinsp_link_libs NO_CACHE
NAMES sinsp
HINTS "${SINSP_LIBDIR}" "${SINSP_HINTS}/lib"
PATHS falcosecurity
@@ -63,21 +67,18 @@ if(NOT SINSP_FOUND)
set(_scap_libs
scap
- scap_engine_util
- scap_event_schema
- driver_event_schema
- scap_engine_bpf
- scap_engine_gvisor
- scap_engine_kmod
scap_engine_nodriver
scap_engine_noop
scap_engine_savefile
scap_engine_source_plugin
- scap_engine_udig
+ scap_engine_test_input
+ scap_error
+ scap_event_schema
+ scap_platform_util
)
foreach(_scap_lib ${_scap_libs})
- find_library(_lib
+ find_library(_lib NO_CACHE
NAMES ${_scap_lib}
HINTS "${SINSP_LIBDIR}" "${SINSP_HINTS}/lib"
PATHS falcosecurity
@@ -85,58 +86,108 @@ if(NOT SINSP_FOUND)
/usr/local/lib
)
if (_lib)
- list(APPEND SINSP_LINK_LIBRARIES ${_lib})
+ list(APPEND _sinsp_link_libs ${_lib})
+ unset(_lib)
endif()
endforeach()
unset(_scap_libs)
unset(_scap_lib)
- unset(_lib)
- if(SINSP_INCLUDE_DIRS AND JSONCPP_LIBRARY)
- set(SINSP_FOUND 1)
- endif()
- find_path(JSONCPP_INCLUDE_DIR
+ find_path(_jsoncpp_include_dir NO_CACHE
NAMES json/json.h
HINTS "${SINSP_INCLUDEDIR}" "${SINSP_HINTS}/include"
- PATH_SUFFIXES jsoncpp
+ PATH_SUFFIXES falcosecurity jsoncpp
+ PATHS
/usr/include
/usr/local/include
)
- if (JSON_INCLUDE_DIR)
- list(APPEND SINSP_INCLUDE_DIRS ${JSONCPP_INCLUDE_DIR})
+ if (_jsoncpp_include_dir)
+ list(APPEND _sinsp_include_dirs ${_jsoncpp_include_dir})
+ unset(_jsoncpp_include_dir)
endif()
- find_library(JSONCPP_LIBRARY
+ find_library(_jsoncpp_lib NO_CACHE
NAMES jsoncpp
- HINTS "${SINSP_LIBDIR}" "${SINSP_HINTS}/lib"
+ HINTS "${SINSP_LIBDIR}" "${SINSP_HINTS}/lib" "${SINSP_HINTS}/lib/falcosecurity"
+ PATHS
+ /usr/lib
+ /usr/local/lib
+ )
+ if (_jsoncpp_lib)
+ list(APPEND _sinsp_link_libs ${_jsoncpp_lib})
+ unset(_jsoncpp_lib)
+ endif()
+
+ find_library(_re2_lib NO_CACHE
+ NAMES re2
+ HINTS "${SINSP_LIBDIR}" "${SINSP_HINTS}/lib" "${SINSP_HINTS}/lib/falcosecurity"
PATHS
/usr/lib
/usr/local/lib
)
- if (JSONCPP_LIBRARY)
- list(APPEND JSONCPP_LIBRARY ${JSONCPP_LIBRARY})
+ if (_re2_lib)
+ list(APPEND _sinsp_link_libs ${_re2_lib})
+ unset(_re2_lib)
endif()
- find_path(TBB_INCLUDE_DIR
+ find_path(_tbb_include_dir NO_CACHE
NAMES tbb/tbb.h
HINTS "${SINSP_INCLUDEDIR}" "${SINSP_HINTS}/include"
+ PATHS
/usr/include
/usr/local/include
)
- if (TBB_INCLUDE_DIR)
- list(APPEND SINSP_INCLUDE_DIRS ${TBB_INCLUDE_DIR})
+ if (_tbb_include_dir)
+ list(APPEND _sinsp_include_dirs ${_tbb_include_dir})
+ unset(_tbb_include_dir)
endif()
- find_library(TBB_LIBRARY
- NAMES tbb
- HINTS "${SINSP_LIBDIR}" "${SINSP_HINTS}/lib"
+ find_library(_tbb_lib NO_CACHE
+ NAMES tbb tbb12
+ HINTS "${SINSP_LIBDIR}" "${SINSP_HINTS}/lib" "${SINSP_HINTS}/lib/falcosecurity"
+ PATHS
+ /usr/lib
+ /usr/local/lib
+ )
+ if (_tbb_lib)
+ list(APPEND _sinsp_link_libs ${_tbb_lib})
+ unset(_tbb_lib)
+ endif()
+
+ # This is terrible, but libsinsp/libscap doesn't support dynamic linking on Windows (yet).
+ find_path(_zlib_include_dir NO_CACHE
+ NAMES zlib/zlib.h
+ HINTS "${SINSP_INCLUDEDIR}" "${SINSP_HINTS}/include"
+ PATHS
+ /usr/include
+ /usr/local/include
+ )
+ if (_zlib_include_dir)
+ list(APPEND _sinsp_include_dirs ${_zlib_include_dir})
+ unset(_zlib_include_dir)
+ endif()
+
+ find_library(_zlib_lib NO_CACHE
+ NAMES zlibstatic
+ HINTS "${SINSP_LIBDIR}" "${SINSP_HINTS}/lib" "${SINSP_HINTS}/lib/falcosecurity"
PATHS
/usr/lib
/usr/local/lib
)
- if (TBB_LIBRARY)
- list(APPEND JSONCPP_LIBRARY ${TBB_LIBRARY})
+ if (_zlib_lib)
+ list(APPEND _sinsp_link_libs ${_zlib_lib})
+ unset(_zlib_lib)
+ endif()
+
+ if(_sinsp_include_dirs AND _sinsp_link_libs)
+ list(REMOVE_DUPLICATES _sinsp_include_dirs)
+ set(SINSP_INCLUDE_DIRS ${_sinsp_include_dirs} CACHE PATH "Paths to libsinsp and libscap headers")
+ set(SINSP_LINK_LIBRARIES ${_sinsp_link_libs} CACHE PATH "Paths to libsinsp, libscap, etc.")
+ set(SINSP_FOUND 1)
+ unset(_sinsp_include_dirs)
+ unset(_sinsp_link_libs)
endif()
+
endif()
# As https://cmake.org/cmake/help/latest/command/link_directories.html
@@ -171,6 +222,23 @@ else()
set(SINSP_LINK_LIBRARIES)
endif()
-cmake_dependent_option(FALCO_PLUGINS "Paths to Falco plugins. Semicolon-separated" "" SINSP_FOUND "")
-
mark_as_advanced(SINSP_INCLUDE_DIRS SINSP_LINK_LIBRARIES)
+
+# Windows plugins
+
+set(_falco_plugins)
+if(WIN32 AND SINSP_FOUND AND NOT FALCO_PLUGINS)
+ FindWSWinLibs( "falcosecurity-plugins-.*" _falco_plugin_dir)
+ if(_falco_plugin_dir)
+ file( GLOB _falco_plugins LIST_DIRECTORIES false "${_falco_plugin_dir}/*.dll" )
+ unset(_falco_plugin_dir)
+ endif()
+endif()
+
+# XXX It looks like we can either autodiscover this value or provide an option but not both.
+if(_falco_plugins)
+ set(FALCO_PLUGINS ${_falco_plugins} CACHE FILEPATH "Paths to Falco plugins. Semicolon-separated")
+ unset(_falco_plugins)
+else()
+ cmake_dependent_option(FALCO_PLUGINS "Paths to Falco plugins. Semicolon-separated" "" "SINSP_FOUND" "")
+endif()
diff --git a/cmake/modules/FindWSWinLibs.cmake b/cmake/modules/FindWSWinLibs.cmake
index c2660820..2b321665 100644
--- a/cmake/modules/FindWSWinLibs.cmake
+++ b/cmake/modules/FindWSWinLibs.cmake
@@ -16,7 +16,7 @@ function( FindWSWinLibs _WS_LIB_SEARCH_PATH _LIB_HINT_VAR )
file( TO_CMAKE_PATH "$ENV{WIRESHARK_LIB_DIR}" _PROJECT_LIB_DIR )
else()
file( TO_CMAKE_PATH "$ENV{WIRESHARK_BASE_DIR}" _WS_BASE_DIR )
- set( _PROJECT_LIB_DIR "${_WS_BASE_DIR}/wireshark-${WIRESHARK_TARGET_PLATFORM}-libs-4.2" )
+ set( _PROJECT_LIB_DIR "${_WS_BASE_DIR}/wireshark-${WIRESHARK_TARGET_PLATFORM}-libs-4.4" )
endif()
endif()
diff --git a/cmake/modules/FindXSLTPROC.cmake b/cmake/modules/FindXSLTPROC.cmake
index b5546224..c5d05df8 100644
--- a/cmake/modules/FindXSLTPROC.cmake
+++ b/cmake/modules/FindXSLTPROC.cmake
@@ -93,7 +93,7 @@ MACRO(XML2HTML _target_dep _dir_pfx _mode _dbk_source _gfx_sources)
SET(_modeparams --stringparam chunker.output.encoding UTF-8 --stringparam chunk.quietly 1)
ELSE() # single-page
SET(_basedir ${_dir_pfx}_html)
- SET(_stylesheet ${CMAKE_SOURCE_DIR}/docbook/custom_layer_single_html.xsl)
+ SET(_stylesheet ${CMAKE_SOURCE_DIR}/doc/custom_layer_single_html.xsl)
SET(_modeparams --output ${_basedir}/index.html)
ENDIF()
@@ -114,7 +114,7 @@ MACRO(XML2HTML _target_dep _dir_pfx _mode _dbk_source _gfx_sources)
COMMAND ${CMAKE_COMMAND}
-E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/${_gfx_src_dir} ${_out_dir}/images
COMMAND ${CMAKE_COMMAND}
- -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/ws.css ${_out_dir}
+ -E copy_if_different ${CMAKE_SOURCE_DIR}/doc/ws.css ${_out_dir}
COMMAND ${XSLTPROC_EXECUTABLE}
--path "${_xsltproc_path}"
--stringparam base.dir ${_basedir}/
diff --git a/cmake/modules/FindZLIB.cmake b/cmake/modules/FindZLIB.cmake
index b6ac9858..77a50513 100644
--- a/cmake/modules/FindZLIB.cmake
+++ b/cmake/modules/FindZLIB.cmake
@@ -138,7 +138,23 @@ if(ZLIB_FOUND)
CMAKE_POP_CHECK_STATE()
ENDIF()
- AddWSWinDLL(ZLIB ZLIB_HINTS "zlib*")
+ #AddWSWinDLL(ZLIB ZLIB_HINTS "zlib*")
+ # With zlib-ng the hints does not work
+ set ( ZLIB_DLL_DIR "${ZLIB_HINTS}/bin"
+ CACHE PATH "Path to ZLIB DLL"
+ )
+ file( GLOB _ZLIB_dll RELATIVE "${ZLIB_DLL_DIR}"
+ "${ZLIB_DLL_DIR}/zlib1.dll"
+ )
+ set ( ZLIB_DLL ${_ZLIB_dll}
+ CACHE FILEPATH "ZLIB DLL file name"
+ )
+ file( GLOB _ZLIB_pdb RELATIVE "${ZLIB_DLL_DIR}"
+ "${ZLIB_DLL_DIR}/zlib.pdb"
+ )
+ set ( ZLIB_PDB ${_ZLIB_pdb}
+ CACHE FILEPATH "ZLIB PDB file name"
+ )
SET(ZLIB_INCLUDE_DIRS ${ZLIB_INCLUDE_DIR})
SET(ZLIB_LIBRARIES ${ZLIB_LIBRARY})
ELSE()
diff --git a/cmake/modules/FindZLIBNG.cmake b/cmake/modules/FindZLIBNG.cmake
new file mode 100644
index 00000000..ae779e4b
--- /dev/null
+++ b/cmake/modules/FindZLIBNG.cmake
@@ -0,0 +1,130 @@
+# - Find zlib-ng
+#
+# Find the native ZLIBNG includes and library.
+# Once done this will define
+#
+# ZLIBNG_INCLUDE_DIRS - where to find zlib-ng.h, etc.
+# ZLIBNG_LIBRARIES - List of libraries when using zlib-ng.
+# ZLIBNG_FOUND - True if zlib-ng found.
+# ZLIBNG_DLL_DIR - (Windows) Path to the zlib-ng DLL.
+# ZLIBNG_DLL - (Windows) Name of the zlib-ng DLL.
+# ZLIBNG_PDB - (Windows) Name of the zlib-ng PDB.
+#
+# ZLIBNG_VERSION_STRING - The version of zlib-ng found (x.y.z)
+# ZLIBNG_VERSION_MAJOR - The major version of zlib-ng
+# ZLIBNG_VERSION_MINOR - The minor version of zlib-ng
+# ZLIBNG_VERSION_PATCH - The patch version of zlib-ng
+# ZLIBNG_VERSION_TWEAK - The tweak version of zlib-ng
+#
+# The following variable are provided for backward compatibility
+#
+# ZLIBNG_MAJOR_VERSION - The major version of zlib-ng
+# ZLIBNG_MINOR_VERSION - The minor version of zlib-ng
+# ZLIBNG_PATCH_VERSION - The patch version of zlib-ng
+
+#=============================================================================
+# Copyright 2001-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distribute this file outside of CMake, substitute the full
+# License text for the above reference.)
+
+include( FindWSWinLibs )
+# Zlib is included with GLib2
+FindWSWinLibs( "zlib-ng-" "ZLIBNG_HINTS" )
+
+if (NOT USE_REPOSITORY) # else we'll find Strawberry Perl's pkgconfig
+ find_package(PkgConfig)
+ pkg_search_module(ZLIBNG zlib-ng)
+endif()
+
+FIND_PATH(ZLIBNG_INCLUDE_DIR
+ NAMES
+ zlib-ng.h
+ HINTS
+ ${ZLIBNG_INCLUDEDIR}
+ ${ZLIBNG_HINTS}/include
+ /usr/include
+ /usr/local/include
+)
+
+SET(ZLIBNG_NAMES z-ng zlib-ng libz-ng.a)
+FIND_LIBRARY(ZLIBNG_LIBRARY
+ NAMES
+ ${ZLIBNG_NAMES}
+ HINTS
+ ${ZLIBNG_LIBDIR}
+ ${ZLIBNG_HINTS}/lib
+ PATHS
+ /usr/lib
+ /usr/local/lib
+)
+
+MARK_AS_ADVANCED(ZLIBNG_LIBRARY ZLIBNG_INCLUDE_DIR)
+
+# handle the QUIETLY and REQUIRED arguments and set ZLIBNG_FOUND to TRUE if
+# all listed variables are TRUE
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(ZLIBNG REQUIRED_VARS ZLIBNG_LIBRARY ZLIBNG_INCLUDE_DIR
+ VERSION_VAR ZLIBNG_VERSION_STRING)
+
+if(ZLIBNG_FOUND)
+ IF(ZLIBNG_INCLUDE_DIR AND EXISTS "${ZLIBNG_INCLUDE_DIR}/zlib-ng.h")
+ FILE(STRINGS "${ZLIBNG_INCLUDE_DIR}/zlib-ng.h" ZLIBNG_H REGEX "^#define ZLIBNG_VERSION \"[^\"]*\"$")
+
+ STRING(REGEX REPLACE "^.*ZLIBNG_VERSION \"([0-9]+).*$" "\\1" ZLIBNG_VERSION_MAJOR "${ZLIBNG_H}")
+ STRING(REGEX REPLACE "^.*ZLIBNG_VERSION \"[0-9]+\\.([0-9]+).*$" "\\1" ZLIBNG_VERSION_MINOR "${ZLIBNG_H}")
+ STRING(REGEX REPLACE "^.*ZLIBNG_VERSION \"[0-9]+\\.[0-9]+\\.([0-9]+).*$" "\\1" ZLIBNG_VERSION_PATCH "${ZLIBNG_H}")
+ SET(ZLIBNG_VERSION_STRING "${ZLIBNG_VERSION_MAJOR}.${ZLIBNG_VERSION_MINOR}.${ZLIBNG_VERSION_PATCH}")
+
+ # only append a TWEAK version if it exists:
+ SET(ZLIBNG_VERSION_TWEAK "")
+ IF( "${ZLIBNG_H}" MATCHES "^.*ZLIBNG_VERSION \"[0-9]+\\.[0-9]+\\.[0-9]+\\.([0-9]+).*$")
+ SET(ZLIBNG_VERSION_TWEAK "${CMAKE_MATCH_1}")
+ SET(ZLIBNG_VERSION_STRING "${ZLIBNG_VERSION_STRING}.${ZLIBNG_VERSION_TWEAK}")
+ ENDIF( "${ZLIBNG_H}" MATCHES "^.*ZLIBNG_VERSION \"[0-9]+\\.[0-9]+\\.[0-9]+\\.([0-9]+).*$")
+
+ SET(ZLIBNG_MAJOR_VERSION "${ZLIBNG_VERSION_MAJOR}")
+ SET(ZLIBNG_MINOR_VERSION "${ZLIBNG_VERSION_MINOR}")
+ SET(ZLIBNG_PATCH_VERSION "${ZLIBNG_VERSION_PATCH}")
+ ENDIF()
+ INCLUDE(CMakePushCheckState)
+ INCLUDE(CheckFunctionExists)
+ CMAKE_PUSH_CHECK_STATE()
+ set(CMAKE_REQUIRED_INCLUDES ${ZLIBNG_INCLUDE_DIR})
+ set(CMAKE_REQUIRED_LIBRARIES ${ZLIBNG_LIBRARY})
+ #
+ # Check for inflate() in zlib, to make sure the zlib library is
+ # usable.
+ #
+ # For example, on at least some versions of Fedora, if you have a
+ # 64-bit machine, have both the 32-bit and 64-bit versions of the
+ # run-time zlib package installed, and have only the *32-bit*
+ # version of the zlib development package installed, it'll find the
+ # header, and think it can use zlib, and will use it in subsequent
+ # tests, but it'll try and link 64-bit test programs with the 32-bit
+ # library, causing those tests to falsely fail. Hilarity ensues.
+ #
+ CHECK_FUNCTION_EXISTS("zng_gzopen" WITH_GZFILEOP)
+ IF(NOT WITH_GZFILEOP)
+ MESSAGE(FATAL_ERROR "zlib-ng.h found but linking with -lz failed to find zng_gzopen();")
+ ENDIF()
+ # reset
+ CMAKE_POP_CHECK_STATE()
+
+ AddWSWinDLL(ZLIBNG ZLIBNG_HINTS "zlib-ng*")
+ SET(ZLIBNG_INCLUDE_DIRS ${ZLIBNG_INCLUDE_DIR})
+ SET(ZLIBNG_LIBRARIES ${ZLIBNG_LIBRARY})
+ELSE()
+ SET(ZLIBNG_INCLUDE_DIRS )
+ SET(ZLIBNG_LIBRARIES )
+ SET(ZLIBNG_DLL_DIR )
+ SET(ZLIBNG_DLL )
+ SET(ZLIBNG_PDB )
+ENDIF()
diff --git a/cmake/modules/UseAsn2Wrs.cmake b/cmake/modules/UseAsn2Wrs.cmake
index 271126c1..ad65a9d9 100644
--- a/cmake/modules/UseAsn2Wrs.cmake
+++ b/cmake/modules/UseAsn2Wrs.cmake
@@ -31,7 +31,7 @@ function(ASN2WRS)
endforeach()
if(NOT ENABLE_DEBUG_A2W)
- set(A2W_FLAGS ${A2W_FLAGS} -L)
+ set(A2W_FLAGS ${A2W_FLAGS} -q -L)
endif()
# Creates a dissector in the source directory and store the timestamp.
diff --git a/cmake/modules/UseCheckAPI.cmake b/cmake/modules/UseCheckAPI.cmake
index 1518fb4f..472289f7 100644
--- a/cmake/modules/UseCheckAPI.cmake
+++ b/cmake/modules/UseCheckAPI.cmake
@@ -27,6 +27,8 @@ macro( CHECKAPI )
${CMAKE_SOURCE_DIR}/tools/checkAPIs.pl
${CHECKAPI_SWITCHES}
${CHECKAPI_SOURCES}
+ DEPENDS
+ ${CHECKAPI_SOURCES}
WORKING_DIRECTORY
${CMAKE_CURRENT_SOURCE_DIR}
COMMENT
diff --git a/cmake/modules/UseCustomIncludes.cmake b/cmake/modules/UseCustomIncludes.cmake
index be01303e..5131dc3c 100644
--- a/cmake/modules/UseCustomIncludes.cmake
+++ b/cmake/modules/UseCustomIncludes.cmake
@@ -3,7 +3,7 @@
# - If no filename is provided, CMakeListsCustom.txt is used.
#
macro( ADD_CUSTOM_CMAKE_INCLUDE )
- if( ${ARGN} )
+ if( ${ARGC} GREATER 0 )
set( _file_list ${ARGN} )
else()
set( _file_list CMakeListsCustom.txt )
diff --git a/cmake/modules/UseLemon.cmake b/cmake/modules/UseLemon.cmake
index e419de1a..8d1d17b7 100644
--- a/cmake/modules/UseLemon.cmake
+++ b/cmake/modules/UseLemon.cmake
@@ -21,7 +21,7 @@ if(LEMON_EXECUTABLE)
endmacro()
add_custom_target(lemon)
else()
- # Compile bundled lemon
+ # Compile bundled lemon with support for -- to end options
macro(generate_lemon_file _out _in)
add_custom_command(
OUTPUT
@@ -32,6 +32,7 @@ else()
COMMAND $<TARGET_FILE:lemon>
-T${CMAKE_SOURCE_DIR}/tools/lemon/lempar.c
-d.
+ --
${_in}
DEPENDS
${_in}
diff --git a/cmake/modules/readme.txt b/cmake/modules/readme.txt
deleted file mode 100644
index e0d4568f..00000000
--- a/cmake/modules/readme.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-The following modules have been copied from CMake trunk _without_ modifications:
-
-* FindZLIB.cmake