]> git.stg.codes - stg.git/blobdiff - stargazer/plugins/CMakeLists.txt
Fix build on OSX.
[stg.git] / stargazer / plugins / CMakeLists.txt
index 884fdbedc2b860d3a041ef14584052c255e28b6c..086521f99ab523f0e3b9d61dad2b0de177830e4b 100644 (file)
@@ -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,6 +69,9 @@ 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 )
@@ -101,6 +107,9 @@ 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 )