X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/a6b0423977ee2ad532b4e5341eaf41e7197804b2..6e6de2ae8f5f661500c565aca8c36277e860b834:/stargazer/plugins/CMakeLists.txt diff --git a/stargazer/plugins/CMakeLists.txt b/stargazer/plugins/CMakeLists.txt index 884fdbed..a8958c43 100644 --- a/stargazer/plugins/CMakeLists.txt +++ b/stargazer/plugins/CMakeLists.txt @@ -8,6 +8,9 @@ if ( BUILD_MOD_IA ) add_library ( mod_auth_ia MODULE authorization/inetaccess/inetaccess.cpp ) target_link_libraries ( mod_auth_ia scriptexecuter crypto logger common ) set_target_properties ( mod_auth_ia PROPERTIES PREFIX "" ) + if ( ${CMAKE_SYSTEM_NAME} STREQUAL "Darwin" ) + set_target_properties ( mod_auth_ia PROPERTIES LINK_FLAGS "-undefined dynamic_lookup" ) + endif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Darwin" ) endif ( BUILD_MOD_IA ) if ( BUILD_MOD_CAP_NF ) @@ -66,10 +69,14 @@ if ( BUILD_MOD_SGCONFIG ) configuration/sgconfig/parser_server_info.cpp ) target_link_libraries ( mod_conf_sg scriptexecuter crypto logger common EXPAT::EXPAT ) set_target_properties ( mod_conf_sg PROPERTIES PREFIX "" ) + if ( ${CMAKE_SYSTEM_NAME} STREQUAL "Darwin" ) + set_target_properties ( mod_conf_sg PROPERTIES LINK_FLAGS "-undefined dynamic_lookup" ) + endif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Darwin" ) endif ( BUILD_MOD_SGCONFIG ) if ( BUILD_MOD_RPCCONFIG ) find_package ( XMLRPC REQUIRED c++ abyss-server ) + include_directories ( ${XMLRPC_INCLUDE_DIRS} ) add_library ( mod_conf_rpc MODULE configuration/rpcconfig/rpcconfig.cpp configuration/rpcconfig/user_helper.cpp configuration/rpcconfig/tariff_helper.cpp @@ -78,7 +85,7 @@ if ( BUILD_MOD_RPCCONFIG ) configuration/rpcconfig/tariffs_methods.cpp configuration/rpcconfig/admins_methods.cpp configuration/rpcconfig/messages_methods.cpp ) - target_link_libraries ( mod_conf_rpc scriptexecuter logger common xmlrpc_server_abyss++ ) + target_link_libraries ( mod_conf_rpc scriptexecuter logger common ${XMLRPC_LIBRARIES} ) set_target_properties ( mod_conf_rpc PROPERTIES PREFIX "" ) endif ( BUILD_MOD_RPCCONFIG ) @@ -88,19 +95,13 @@ if ( BUILD_MOD_PING ) set_target_properties ( mod_ping PROPERTIES PREFIX "" ) endif ( BUILD_MOD_PING ) -if ( BUILD_MOD_RADIUS ) - find_package ( YAJL REQUIRED ) - add_library ( mod_radius MODULE other/radius/radius.cpp - other/radius/config.cpp - other/radius/conn.cpp ) - target_link_libraries ( mod_radius logger json common YAJL::YAJL ) - set_target_properties ( mod_radius PROPERTIES PREFIX "" ) -endif ( BUILD_MOD_RADIUS ) - if ( BUILD_MOD_RSCRYPT ) add_library ( mod_remote_script MODULE other/rscript/rscript.cpp other/rscript/nrmap_parser.cpp ) target_link_libraries ( mod_remote_script crypto scriptexecuter logger common ) set_target_properties ( mod_remote_script PROPERTIES PREFIX "" ) + if ( ${CMAKE_SYSTEM_NAME} STREQUAL "Darwin" ) + set_target_properties ( mod_remote_script PROPERTIES LINK_FLAGS "-undefined dynamic_lookup" ) + endif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Darwin" ) endif ( BUILD_MOD_RSCRYPT ) if ( BUILD_MOD_SMUX ) @@ -143,6 +144,7 @@ endif ( BUILD_MOD_STORE_MYSQL ) if ( BUILD_MOD_STORE_POSTGRESQL ) find_package ( PostgreSQL REQUIRED ) + include_directories ( ${PostgreSQL_INCLUDE_DIRS} ) add_library ( mod_store_postgresql MODULE store/postgresql/postgresql_store.cpp store/postgresql/postgresql_store_admins.cpp store/postgresql/postgresql_store_corporations.cpp @@ -151,6 +153,6 @@ if ( BUILD_MOD_STORE_POSTGRESQL ) store/postgresql/postgresql_store_tariffs.cpp store/postgresql/postgresql_store_users.cpp store/postgresql/postgresql_store_utils.cpp ) - target_link_libraries ( mod_store_postgresql crypto logger common PostgreSQL::PostgreSQL ) + target_link_libraries ( mod_store_postgresql crypto logger common ${PostgreSQL_LIBRARIES} ) set_target_properties ( mod_store_postgresql PROPERTIES PREFIX "" ) endif ( BUILD_MOD_STORE_POSTGRESQL )