diff --git a/CMakeLists.txt b/CMakeLists.txt index 9685451eb5..993e93c13a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/INSTALL b/INSTALL index 7396cc78de..c35a1247f1 100644 --- a/INSTALL +++ b/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. diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 4953329e25..4e4cd2f977 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -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