]> git.stg.codes - stg.git/commitdiff
Fix build on Darwin.
authorMaksym Mamontov <madf@madf.info>
Wed, 28 Dec 2022 14:32:34 +0000 (16:32 +0200)
committerMaksym Mamontov <madf@madf.info>
Wed, 28 Dec 2022 14:32:34 +0000 (16:32 +0200)
projects/stargazer/plugins/CMakeLists.txt

index 8adb6c5f9d5685f244607f7b13a996651a03a53a..fc378ba6bff46819fbefd70e20a4acde24cae898 100644 (file)
@@ -155,6 +155,9 @@ if ( BUILD_MOD_RPCCONFIG )
                                       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}" )
@@ -272,6 +275,9 @@ if ( BUILD_MOD_STORE_POSTGRESQL )
                                               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}" )