X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/2741145e6eb219cb0ccb75e729b86f8fc2b499bb..e6c0bd53164bd30bbe038c80a370707847fc266c:/projects/stargazer/plugins/CMakeLists.txt diff --git a/projects/stargazer/plugins/CMakeLists.txt b/projects/stargazer/plugins/CMakeLists.txt index a229cc50..8adb6c5f 100644 --- a/projects/stargazer/plugins/CMakeLists.txt +++ b/projects/stargazer/plugins/CMakeLists.txt @@ -138,7 +138,12 @@ if ( BUILD_MOD_SGCONFIG ) endif ( BUILD_MOD_SGCONFIG ) if ( BUILD_MOD_RPCCONFIG ) - find_package ( XMLRPC 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 @@ -149,7 +154,6 @@ if ( BUILD_MOD_RPCCONFIG ) configuration/rpcconfig/admins_methods.cpp configuration/rpcconfig/messages_methods.cpp ) target_link_libraries ( mod_conf_rpc scriptexecuter logger common ${XMLRPC_LIBRARIES} ) - target_compile_definitions ( mod_conf_rpc PUBLIC auto_ptr=unique_ptr ) set_target_properties ( mod_conf_rpc PROPERTIES PREFIX "" ) if ( CLANG_TIDY_EXE )