mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Use default FindPerl CMake module and better documented sed dependency
This commit is contained in:
parent
4e4a18f3af
commit
8cd35b7116
3 changed files with 15 additions and 15 deletions
|
@ -40,6 +40,14 @@ project(Bro)
|
|||
set(PACKAGE "Bro")
|
||||
file(STRINGS "${CMAKE_SOURCE_DIR}/VERSION" VERSION LIMIT_COUNT 1)
|
||||
|
||||
find_program(SED_EXE sed)
|
||||
if (NOT SED_EXE)
|
||||
message(FATAL_ERROR "Could not find required dependency: sed")
|
||||
else ()
|
||||
message(STATUS "Found sed: ${SED_EXE}")
|
||||
endif ()
|
||||
|
||||
find_package(Perl REQUIRED)
|
||||
find_package(FLEX REQUIRED)
|
||||
find_package(BISON REQUIRED)
|
||||
find_package(PCAP REQUIRED)
|
||||
|
|
6
INSTALL
6
INSTALL
|
@ -15,6 +15,12 @@ before you begin with the installation:
|
|||
This comes with many systems, but if you get errors compiling
|
||||
parse.y, you will need to install it.
|
||||
|
||||
* Perl
|
||||
Used only during the Bro build process
|
||||
|
||||
* sed
|
||||
Used only during the Bro build process
|
||||
|
||||
* BIND8 headers and libraries
|
||||
These are usually already installed as well.
|
||||
|
||||
|
|
|
@ -1,18 +1,9 @@
|
|||
find_package(FLEX REQUIRED)
|
||||
find_package(BISON REQUIRED)
|
||||
find_package(PCAP REQUIRED)
|
||||
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_SOURCE_DIR}/binpac/lib
|
||||
${CMAKE_BINARY_DIR}/binpac/lib
|
||||
)
|
||||
|
||||
find_program(SED_EXE sed)
|
||||
if (NOT SED_EXE)
|
||||
message(FATAL_ERROR "sed required")
|
||||
endif ()
|
||||
|
||||
macro(REPLACE_YY_PREFIX_TARGET inFile outFile yylexPrefix yyPrefix)
|
||||
set(args "'/extern char.*getenv/d\;s/yylex/${yylexPrefix}lex/\;s/yy/${yyPrefix}/g'" < ${inFile} > ${outFile})
|
||||
add_custom_command(OUTPUT ${outFile}
|
||||
|
@ -198,14 +189,9 @@ if (USE_NMALLOC)
|
|||
set(malloc_SRCS malloc.c)
|
||||
endif ()
|
||||
|
||||
find_program(PERL_EXE perl)
|
||||
if (NOT PERL_EXE)
|
||||
message(FATAL_ERROR "perl required")
|
||||
endif ()
|
||||
|
||||
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/DebugCmdConstants.h
|
||||
${CMAKE_CURRENT_BINARY_DIR}/DebugCmdInfoConstants.h
|
||||
COMMAND ${PERL_EXE}
|
||||
COMMAND ${PERL_EXECUTABLE}
|
||||
ARGS ${CMAKE_CURRENT_SOURCE_DIR}/make_dbg_constants.pl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/DebugCmdInfoConstants.in
|
||||
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/DebugCmdInfoConstants.in
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue