|
|
@ -11,6 +11,7 @@ option(WITH_UPNP "Include support for UPnP client" OFF) |
|
|
|
option(WITH_TESTS "Build unit tests" OFF) |
|
|
|
option(WITH_TESTS "Build unit tests" OFF) |
|
|
|
option(WITH_BENCHMARK "Build benchmarking code" OFF) |
|
|
|
option(WITH_BENCHMARK "Build benchmarking code" OFF) |
|
|
|
option(WITH_OPTIMIZE "Optimization flags" OFF) |
|
|
|
option(WITH_OPTIMIZE "Optimization flags" OFF) |
|
|
|
|
|
|
|
option(I2PD_DATA_PATH "The path to the i2pd data folder") |
|
|
|
|
|
|
|
|
|
|
|
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/build/cmake_modules") |
|
|
|
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/build/cmake_modules") |
|
|
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) |
|
|
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) |
|
|
@ -153,6 +154,18 @@ include_directories( |
|
|
|
"core/" |
|
|
|
"core/" |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(I2PD_DATA_PATH) |
|
|
|
|
|
|
|
set(I2PD_DATA_DIR ${I2PD_DATA_PATH}) |
|
|
|
|
|
|
|
# Using custom path, make sure the code knows about this |
|
|
|
|
|
|
|
add_definitions(-DI2PD_CUSTOM_DATA_PATH="${I2PD_DATA_PATH}") |
|
|
|
|
|
|
|
elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows") |
|
|
|
|
|
|
|
set(I2PD_DATA_DIR "$ENV{APPDATA}\i2pd") |
|
|
|
|
|
|
|
elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin") |
|
|
|
|
|
|
|
set(I2PD_DATA_DIR "$ENV{HOME}/Library/Application Support/i2pd") |
|
|
|
|
|
|
|
else() |
|
|
|
|
|
|
|
set(I2PD_DATA_DIR "$ENV{HOME}/.i2pd") |
|
|
|
|
|
|
|
endif() |
|
|
|
|
|
|
|
|
|
|
|
# Show summary |
|
|
|
# Show summary |
|
|
|
message(STATUS "---------------------------------------") |
|
|
|
message(STATUS "---------------------------------------") |
|
|
|
message(STATUS "Build type : ${CMAKE_BUILD_TYPE}") |
|
|
|
message(STATUS "Build type : ${CMAKE_BUILD_TYPE}") |
|
|
@ -160,6 +173,7 @@ message(STATUS "Compiler vendor : ${CMAKE_CXX_COMPILER_ID}") |
|
|
|
message(STATUS "Compiler version : ${CMAKE_CXX_COMPILER_VERSION}") |
|
|
|
message(STATUS "Compiler version : ${CMAKE_CXX_COMPILER_VERSION}") |
|
|
|
message(STATUS "Compiler path : ${CMAKE_CXX_COMPILER}") |
|
|
|
message(STATUS "Compiler path : ${CMAKE_CXX_COMPILER}") |
|
|
|
message(STATUS "Install prefix: : ${CMAKE_INSTALL_PREFIX}") |
|
|
|
message(STATUS "Install prefix: : ${CMAKE_INSTALL_PREFIX}") |
|
|
|
|
|
|
|
message(STATUS "I2PD data directory: ${I2PD_DATA_DIR}") |
|
|
|
message(STATUS "Options:") |
|
|
|
message(STATUS "Options:") |
|
|
|
message(STATUS " AESNI : ${WITH_AESNI}") |
|
|
|
message(STATUS " AESNI : ${WITH_AESNI}") |
|
|
|
message(STATUS " HARDENING : ${WITH_HARDENING}") |
|
|
|
message(STATUS " HARDENING : ${WITH_HARDENING}") |
|
|
@ -183,3 +197,8 @@ add_subdirectory(core) |
|
|
|
add_subdirectory(client) |
|
|
|
add_subdirectory(client) |
|
|
|
add_subdirectory(tests) |
|
|
|
add_subdirectory(tests) |
|
|
|
add_subdirectory(benchmark) |
|
|
|
add_subdirectory(benchmark) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(WITH_BINARY) |
|
|
|
|
|
|
|
file(MAKE_DIRECTORY "${I2PD_DATA_DIR}/webui") |
|
|
|
|
|
|
|
file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/webui" DESTINATION "${I2PD_DATA_DIR}") |
|
|
|
|
|
|
|
endif() |
|
|
|