Skip to content

Commit

Permalink
Create meson.build
Browse files Browse the repository at this point in the history
  • Loading branch information
rindeal authored Jun 12, 2024
1 parent 8da6ccb commit 9c9c640
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
project('amalgamate', 'cpp',
version : '0.1',
default_options : ['cpp_std=c++14'])

juce_core_dir = '3rd/JUCE/modules/juce_core'
srcs = ['Amalgamate.cpp']

# Compiler flags
cpp_args = ['-I' + juce_core_dir, '-I.', '-DJUCE_APP_CONFIG_HEADER="AppConfig.h"']
link_args = []
libs = []

# Platform specific settings
if host_machine.system() == 'darwin'
srcs += join_paths(juce_core_dir, 'juce_core.mm')
link_args += ['-framework Foundation', '-framework AppKit']
elif host_machine.system() == 'windows'
libs += ['ole32', 'Shell32']
else
srcs += join_paths(juce_core_dir, 'juce_core.cpp')
libs += ['dl']
link_args += ['-pthread']
cpp_args += ['-pthread']
endif

# Debug settings
if get_option('buildtype') == 'debug'
cpp_args += ['-DDEBUG=1', '-DJUCE_DEBUG=1']
endif

executable('amalgamate', srcs,
cpp_args : cpp_args,
link_args : link_args,
dependencies : libs)

0 comments on commit 9c9c640

Please sign in to comment.