Browse Source

server only builds on linux

Kajetan Johannes Hammerle 2 years ago
parent
commit
b157097c40
1 changed files with 10 additions and 8 deletions
  1. 10 8
      meson.build

+ 10 - 8
meson.build

@@ -48,9 +48,6 @@ sources_test = ['tests/Main.cpp']
 
 args = ['-Wall', '-Wextra', '-pedantic', '-Werror', '-DLOG_LEVEL=4']
 
-liblonelytiger_proj = subproject('lonely-tiger')
-liblonelytiger_dep = liblonelytiger_proj.get_variable('liblonelytiger_dep')
-
 libgamingcore_proj = subproject('gaming-core')
 libgamingcore_dep = libgamingcore_proj.get_variable('libgamingcore_dep')
 
@@ -62,10 +59,15 @@ common_dep = declare_dependency(
     link_with: common, 
     include_directories: ['subprojects/gaming-core'])
 
-executable('game_server', 
-    sources: src_server,
-    dependencies: [liblonelytiger_dep, common_dep],
-    cpp_args: args)
+if host_machine.system() == 'linux'
+    liblonelytiger_proj = subproject('lonely-tiger')
+    liblonelytiger_dep = liblonelytiger_proj.get_variable('liblonelytiger_dep')
+
+    executable('game_server', 
+        sources: src_server,
+        dependencies: [liblonelytiger_dep, common_dep],
+        cpp_args: args)
+endif
     
 executable('game_tests', 
     sources: sources_test,
@@ -74,4 +76,4 @@ executable('game_tests',
 executable('game_client', 
     sources: src_client,
     dependencies : common_dep,
-    cpp_args: args)
+    cpp_args: args)