bigsnitch/CMakeLists.txt

87 lines
2.2 KiB
CMake
Raw Normal View History

2020-08-05 00:08:41 +00:00
cmake_minimum_required(VERSION 3.5)
2021-01-01 23:46:23 +00:00
project(bigsnitch LANGUAGES CXX)
2020-08-05 00:08:41 +00:00
set(CMAKE_INCLUDE_CURRENT_DIR ON)
# for BSD
2020-08-12 16:30:17 +00:00
link_directories(/usr/local/lib)
2020-08-05 00:08:41 +00:00
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
2020-08-05 00:08:41 +00:00
2020-08-09 12:07:14 +00:00
set(CMAKE_CXX_STANDARD 17)
2020-08-05 00:08:41 +00:00
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(PLUGIN_DIR ${CMAKE_BINARY_DIR}/plugins)
2020-08-05 00:08:41 +00:00
find_package(Qt5 COMPONENTS Widgets REQUIRED)
2020-08-08 11:44:16 +00:00
find_package(nlohmann_json REQUIRED)
find_package(SQLite3 REQUIRED)
2020-09-04 08:33:33 +00:00
find_package(Catch2 REQUIRED)
2020-08-05 00:08:41 +00:00
2021-01-01 23:46:23 +00:00
add_executable(bigsnitch
main.cpp
mainwindow.cpp
session.cpp
2021-01-09 10:17:50 +00:00
pluginhandler.cpp
proxyhandler.cpp
historymodel.cpp
editandresend.cpp
settings.cpp
mainwindow.h
session.h
includes.h
proxyhandler.h
2021-01-09 10:17:50 +00:00
pluginhandler.h
historymodel.h
editandresend.h
settings.h
include/api.h
include/proxyinterface.h
include/httpsender.h
include/httpreceiver.h
mainwindow.ui
editandresend.ui
settings.ui
2021-03-20 21:56:03 +00:00
pluginlist.ui
)
2020-08-05 00:08:41 +00:00
2021-01-01 23:46:23 +00:00
target_include_directories(bigsnitch PRIVATE /usr/local/include)
2021-03-20 21:56:03 +00:00
target_link_libraries(bigsnitch PRIVATE Qt5::Widgets sqlite3)
2020-09-04 08:33:33 +00:00
2021-01-01 23:46:23 +00:00
add_executable(bigsnitch_tests
tests/generic_tests.cpp
)
2020-09-04 08:33:33 +00:00
2021-01-01 23:46:23 +00:00
target_include_directories(bigsnitch_tests PRIVATE /usr/local/include)
2021-03-20 21:56:03 +00:00
target_link_libraries(bigsnitch_tests PRIVATE Qt5::Widgets sqlite3 Catch2::Catch2)
2020-09-04 08:33:33 +00:00
add_subdirectory(plugins/mitmproxy/)
2020-09-10 19:26:41 +00:00
2020-09-04 08:33:33 +00:00
include(CTest)
include(Catch)
2021-01-01 23:46:23 +00:00
catch_discover_tests(bigsnitch_tests)
option(BUILD_DOCS "build documentation" ON)
if(BUILD_DOCS)
find_package(Doxygen REQUIRED)
set(DOXYGEN_IN ${CMAKE_CURRENT_SOURCE_DIR}/docs/Doxyfile.in)
set(DOXYGEN_OUT ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
configure_file(${DOXYGEN_IN} ${DOXYGEN_OUT} @ONLY)
message("Doxygen build started")
add_custom_target( doc_doxygen ALL
COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_OUT}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generating API documentation with Doxygen"
VERBATIM )
endif(BUILD_DOCS)