X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/06186a8866478b05d56179dc2c5a3c4b3fd3a8f4..c02633d77cb05a5deb05440d77b12ccc5bc19b85:/libs/CMakeLists.txt?ds=sidebyside diff --git a/libs/CMakeLists.txt b/libs/CMakeLists.txt index ece4c9a3..7d971315 100644 --- a/libs/CMakeLists.txt +++ b/libs/CMakeLists.txt @@ -1,8 +1,10 @@ set ( CMAKE_POSITION_INDEPENDENT_CODE ON ) if ( BUILD_LIB_COMMON ) + find_package ( Iconv REQUIRED ) add_library ( common STATIC common/blockio.cpp common/common.cpp common/strptime.cpp ) target_include_directories ( common PUBLIC common/include ) + target_link_libraries ( common Iconv::Iconv ) endif ( BUILD_LIB_COMMON ) if ( BUILD_LIB_CONFFILES ) @@ -26,16 +28,11 @@ if ( BUILD_LIB_IA ) target_link_libraries ( ia crypto common ) endif ( BUILD_LIB_IA ) -if ( BUILD_LIB_IBPP ) - add_library ( ibpp STATIC ibpp/all_in_one.cpp ) - target_include_directories ( ibpp PUBLIC ibpp/include ) -endif ( BUILD_LIB_IBPP ) - -if ( BUILD_LIB_JSON ) - add_library ( json STATIC json/generator.cpp json/parser.cpp ) - target_include_directories ( json PUBLIC json/include ) - target_link_libraries ( json common ) -endif ( BUILD_LIB_JSON ) +#if ( BUILD_LIB_IBPP ) +# add_library ( ibpp STATIC ibpp/all_in_one.cpp ) +# target_include_directories ( ibpp PUBLIC ibpp/include ) +# target_compile_options ( ibpp PRIVATE -Wno-old-style-cast $<$:-Wno-useless-cast> ) +#endif ( BUILD_LIB_IBPP ) if ( BUILD_LIB_LOGGER ) add_library ( logger STATIC logger/logger.cpp ) @@ -57,11 +54,13 @@ if ( BUILD_LIB_SMUX ) file ( GLOB SMUX_C_FILES smux/*.c ) add_library ( smux STATIC ${SMUX_C_FILES} ) target_include_directories ( smux PUBLIC smux/include smux/include/stg ) + target_compile_options ( smux PRIVATE -Wno-cpp ) endif ( BUILD_LIB_SMUX ) if ( BUILD_LIB_SRVCONF ) + find_package ( EXPAT REQUIRED ) file ( GLOB PARSERS srvconf/parsers/*.cpp ) add_library ( srvconf STATIC srvconf/servconf.cpp srvconf/netunit.cpp ${PARSERS} ) target_include_directories ( srvconf PUBLIC srvconf/include ) - target_link_libraries ( srvconf crypto common ) + target_link_libraries ( srvconf crypto common EXPAT::EXPAT ) endif ( BUILD_LIB_SRVCONF )