endif ()
endif ( BUILD_MOD_AO )
+if ( BUILD_MOD_RADIUS )
+ find_package ( Boost REQUIRED )
+
+ add_library ( mod_radius MODULE other/radius/radius.cpp )
+ target_link_libraries ( mod_radius PRIVATE scriptexecuter logger common )
+ set_target_properties ( mod_radius PROPERTIES PREFIX "" )
+
+ include ( ExternalProject )
+
+ ExternalProject_Add ( async-radius
+ GIT_REPOSITORY https://github.com/madf/async-radius.git
+ GIT_TAG 1.1.0
+ GIT_SHALLOW true
+ INSTALL_COMMAND ""
+ CMAKE_ARGS -DCMAKE_CXX_FLAGS=-fPIC )
+
+ ExternalProject_Get_property ( async-radius SOURCE_DIR BINARY_DIR )
+
+ target_include_directories ( mod_radius PRIVATE "${SOURCE_DIR}/include" )
+ target_link_directories ( mod_radius PRIVATE "${BINARY_DIR}/src" )
+
+ add_dependencies ( mod_radius async-radius )
+
+ target_link_libraries ( mod_radius PRIVATE radproto Boost::boost )
+
+ if ( CLANG_TIDY_EXE )
+ set_target_properties ( mod_radius PROPERTIES CXX_CLANG_TIDY "${DO_CLANG_TIDY}" )
+ endif ()
+ if ( INCLUDE_WHAT_YOU_USE_EXE )
+ set_target_properties ( mod_radius PROPERTIES CXX_INCLUDE_WHAT_YOU_USE "${DO_INCLUDE_WHAT_YOU_USE}" )
+ endif ()
+endif ( BUILD_MOD_RADIUS )
+
if ( BUILD_MOD_IA )
add_library ( mod_auth_ia MODULE authorization/inetaccess/inetaccess.cpp )
target_link_libraries ( mod_auth_ia scriptexecuter crypto logger common )
endif ( BUILD_MOD_SGCONFIG )
if ( BUILD_MOD_RPCCONFIG )
- find_package ( XMLRPC 1.54 REQUIRED c++ abyss-server )
+ find_package ( XMLRPC 1.58.0 REQUIRED c++2 abyss-server )
+ try_compile ( XMLRPC_C_NO_AUTO_PTR ${CMAKE_CURRENT_BINARY_DIR} "${PROJECT_SOURCE_DIR}/checks/xmlrpc-c-auto_ptr.cpp" CMAKE_FLAGS -DINCLUDE_DIRECTORIES=${XMLRPC_INCLUDE_DIRS} LINK_LIBRARIES ${XMLRPC_LIBRARIES} OUTPUT_VARIABLE TRY_COMPILE_OUTPUT )
+ if ( NOT XMLRPC_C_NO_AUTO_PTR )
+ message ( WARNING ${TRY_COMPILE_OUTPUT} )
+ message ( FATAL_ERROR "Your version of XMLRPC-C library can not be used with C++17. Try upgrading to at least 1.58.0." )
+ endif ()
include_directories ( ${XMLRPC_INCLUDE_DIRS} )
add_library ( mod_conf_rpc MODULE configuration/rpcconfig/rpcconfig.cpp
configuration/rpcconfig/user_helper.cpp
configuration/rpcconfig/messages_methods.cpp )
target_link_libraries ( mod_conf_rpc scriptexecuter logger common ${XMLRPC_LIBRARIES} )
set_target_properties ( mod_conf_rpc PROPERTIES PREFIX "" )
+ if ( ${CMAKE_SYSTEM_NAME} STREQUAL "Darwin" )
+ set_target_properties ( mod_conf_rpc PROPERTIES LINK_FLAGS "-undefined dynamic_lookup" )
+ endif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Darwin" )
if ( CLANG_TIDY_EXE )
set_target_properties ( mod_conf_rpc PROPERTIES CXX_CLANG_TIDY "${DO_CLANG_TIDY}" )
store/postgresql/postgresql_store_utils.cpp )
target_link_libraries ( mod_store_postgresql crypto logger common ${PostgreSQL_LIBRARIES} )
set_target_properties ( mod_store_postgresql PROPERTIES PREFIX "" )
+ if ( ${CMAKE_SYSTEM_NAME} STREQUAL "Darwin" )
+ set_target_properties ( mod_store_postgresql PROPERTIES LINK_FLAGS "-undefined dynamic_lookup" )
+ endif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Darwin" )
if ( CLANG_TIDY_EXE )
set_target_properties ( mod_store_postgresql PROPERTIES CXX_CLANG_TIDY "${DO_CLANG_TIDY}" )