Fix CMake option defaults on Windows

This commit is contained in:
Dominik Charousset 2023-05-02 20:43:33 +02:00
parent 7af3611807
commit c2c34148ca

View file

@ -20,20 +20,26 @@ if ( NOT GENERATOR_IS_MULTI_CONFIG )
unset(build_type_lower)
endif ()
# On UNIX, install additional Zeek tools by default and build shared objects.
if ( NOT WIN32 )
set(ZEEK_INSTALL_TOOLS_DEFAULT ON)
option(BUILD_SHARED_LIBS "Build targets as shared libraries." ON)
else ()
set(ZEEK_INSTALL_TOOLS_DEFAULT OFF)
endif ()
# CMake options (Boolean flags).
option(BUILD_SHARED_LIBS "Build targets as shared libraries." ON)
option(ENABLE_DEBUG "Build Zeek with additional debugging support." ${ENABLE_DEBUG_DEFAULT})
option(ENABLE_JEMALLOC "Link against jemalloc." OFF)
option(ENABLE_PERFTOOLS "Build with support for Google perftools." OFF)
option(ENABLE_ZEEK_UNIT_TESTS "Build the C++ (doctest) unit tests?" ON)
option(ENABLE_ZEEK_UNIT_TESTS "Build the C++ unit tests." ON)
option(INSTALL_AUX_TOOLS "Install additional tools from auxil." ON)
option(INSTALL_BTEST "Install btest alongside Zeek." ON)
option(INSTALL_BTEST_PCAPS "Install pcap files for testing." ON)
option(INSTALL_ZEEKCTL "Install zeekctl." ON)
option(INSTALL_ZEEK_ARCHIVER "Install the zeek-archiver." ON)
option(INSTALL_ZEEK_CLIENT "Install the zeek-client." ON)
option(INSTALL_ZKG "Install zkg." ON)
option(INSTALL_AUX_TOOLS "Install additional tools from auxil." ${ZEEK_INSTALL_TOOLS_DEFAULT})
option(INSTALL_BTEST "Install btest alongside Zeek." ${ZEEK_INSTALL_TOOLS_DEFAULT})
option(INSTALL_BTEST_PCAPS "Install pcap files for testing." ${ZEEK_INSTALL_TOOLS_DEFAULT})
option(INSTALL_ZEEKCTL "Install zeekctl." ${ZEEK_INSTALL_TOOLS_DEFAULT})
option(INSTALL_ZEEK_ARCHIVER "Install the zeek-archiver." ${ZEEK_INSTALL_TOOLS_DEFAULT})
option(INSTALL_ZEEK_CLIENT "Install the zeek-client." ${ZEEK_INSTALL_TOOLS_DEFAULT})
option(INSTALL_ZKG "Install zkg." ${ZEEK_INSTALL_TOOLS_DEFAULT})
option(PREALLOCATE_PORT_ARRAY "Pre-allocate all ports for zeek::Val." ON)
option(ZEEK_STANDALONE "Build Zeek as stand-alone binary?" ON)