]> git.stg.codes - stg.git/blobdiff - libs/CMakeLists.txt
Fix some BSD-related issues.
[stg.git] / libs / CMakeLists.txt
index 8528b9510308022847426f477e340eb0383235f7..f413010e1a4ac6f10d556fa9252a4133d8d08128 100644 (file)
@@ -29,9 +29,9 @@ if ( BUILD_LIB_IA )
 endif ( BUILD_LIB_IA )
 
 if ( BUILD_LIB_IBPP )
-    set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-old-style-cast -Wno-useless-cast")
     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 $<$<CXX_COMPILER_ID:GNU>:-Wno-useless-cast> )
 endif ( BUILD_LIB_IBPP )
 
 if ( BUILD_LIB_JSON )
@@ -64,8 +64,9 @@ if ( BUILD_LIB_SMUX )
 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 )