Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions mesonbuild/templates/cpptemplates.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@

exe = executable(
'{exe_name}',
[sources],
sources,
install : true,
dependencies : dependencies,
)
Expand Down Expand Up @@ -131,12 +131,11 @@ class {utoken}_PUBLIC {class_name} {{
lib_args = ['-DBUILDING_{utoken}']

sources = [{source_files}

]

lib = library(
'{lib_name}',
[sources],
sources,
install : true,
cpp_shared_args : lib_args,
gnu_symbol_visibility : 'hidden',
Expand Down
10 changes: 8 additions & 2 deletions mesonbuild/templates/cstemplates.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,12 @@
dependencies = [{dependencies}
]

sources = [{source_files}
]

exe = executable(
'{exe_name}',
'{source_name}',
sources,
install : true,
dependencies : dependencies,
)
Expand Down Expand Up @@ -83,9 +86,12 @@
dependencies = [{dependencies}
]

sources = [{source_files}
]

stlib = shared_library(
'{lib_name}',
'{source_file}',
sources,
dependencies : dependencies,
install : true,
)
Expand Down
4 changes: 2 additions & 2 deletions mesonbuild/templates/ctemplates.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@

lib = library(
'{lib_name}',
[sources],
sources,
install : true,
c_shared_args : lib_args,
gnu_symbol_visibility : 'hidden',
Expand Down Expand Up @@ -147,7 +147,7 @@

exe = executable(
'{exe_name}',
[sources],
sources,
dependencies : dependencies,
install : true,
)
Expand Down
10 changes: 8 additions & 2 deletions mesonbuild/templates/cudatemplates.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,12 @@
dependencies = [{dependencies}
]

sources = [{source_files}
]

exe = executable(
'{exe_name}',
'{source_name}',
sources,
dependencies : dependencies,
install : true,
)
Expand Down Expand Up @@ -122,9 +125,12 @@ class {utoken}_PUBLIC {class_name} {{
dependencies = [{dependencies}
]

sources = [{source_files}
]

lib = library(
'{lib_name}',
'{source_file}',
sources,
install : true,
cpp_shared_args : lib_args,
gnu_symbol_visibility : 'hidden',
Expand Down
6 changes: 2 additions & 4 deletions mesonbuild/templates/dlangtemplates.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,11 @@
]

sources = [{source_files}

]

exe = executable(
'{exe_name}',
[sources],
sources,
dependencies : dependencies,
install : true,
)
Expand Down Expand Up @@ -89,12 +88,11 @@
]

sources = [{source_files}

]

stlib = static_library(
'{lib_name}',
[sources],
sources,
install : true,
gnu_symbol_visibility : 'hidden',
dependencies : dependencies,
Expand Down
10 changes: 8 additions & 2 deletions mesonbuild/templates/fortrantemplates.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,12 @@
dependencies = [{dependencies}
]

sources = [{source_files}
]

lib = library(
'{lib_name}',
'{source_file}',
sources,
install : true,
fortran_shared_args : lib_args,
gnu_symbol_visibility : 'hidden',
Expand Down Expand Up @@ -110,9 +113,12 @@
dependencies = [{dependencies}
]

sources = [{source_files}
]

exe = executable(
'{exe_name}',
'{source_name}',
sources,
dependencies : dependencies,
install : true,
)
Expand Down
6 changes: 2 additions & 4 deletions mesonbuild/templates/javatemplates.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,11 @@
]

sources = [{source_files}

]

exe = jar(
'{exe_name}',
[sources],
sources,
main_class : '{exe_name}',
dependencies : dependencies,
install : true,
Expand Down Expand Up @@ -91,12 +90,11 @@
]

sources = [{source_files}

]

jarlib = jar(
'{class_name}',
[sources],
sources,
dependencies : dependencies,
main_class : '{class_name}',
install : true,
Expand Down
10 changes: 8 additions & 2 deletions mesonbuild/templates/objcpptemplates.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,16 @@
dependencies = [{dependencies}
]

sources = [{source_files}
]

# These arguments are only used to build the shared library
# not the executables that use the library.
lib_args = ['-DBUILDING_{utoken}']

lib = library(
'{lib_name}',
'{source_file}',
sources,
install : true,
objcpp_shared_args : lib_args,
dependencies : dependencies,
Expand Down Expand Up @@ -139,9 +142,12 @@
dependencies = [{dependencies}
]

sources = [{source_files}
]

exe = executable(
'{exe_name}',
'{source_name}',
sources,
dependencies : dependencies,
install : true,
)
Expand Down
10 changes: 8 additions & 2 deletions mesonbuild/templates/objctemplates.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,16 @@
dependencies = [{dependencies}
]

sources = [{source_files}
]

# These arguments are only used to build the shared library
# not the executables that use the library.
lib_args = ['-DBUILDING_{utoken}']

lib = library(
'{lib_name}',
'{source_file}',
sources,
install : true,
objc_shared_args : lib_args,
dependencies : dependencies,
Expand Down Expand Up @@ -138,9 +141,12 @@
dependencies = [{dependencies}
]

sources = [{source_files}
]

exe = executable(
'{exe_name}',
'{source_name}',
sources,
dependencies : dependencies,
install : true,
)
Expand Down
10 changes: 8 additions & 2 deletions mesonbuild/templates/rusttemplates.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,12 @@
dependencies = [{dependencies}
]

sources = [{source_files}
]

lib = static_library(
'{lib_name}',
'{source_file}',
sources,
dependencies : dependencies,
install : true,
)
Expand Down Expand Up @@ -86,9 +89,12 @@
dependencies = [{dependencies}
]

sources = [{source_files}
]

exe = executable(
'{exe_name}',
'{source_name}',
sources,
dependencies : dependencies,
install : true,
)
Expand Down
2 changes: 1 addition & 1 deletion mesonbuild/templates/sampleimpl.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ class FileImpl(SampleImpl):

def __init__(self, args: Arguments):
super().__init__(args)
self.sources = args.srcfiles if args.srcfiles else [Path(f'{self.executable_name}.{self.source_ext}')]
self.sources = args.srcfiles if args.srcfiles else [Path(f'{self.name}.{self.source_ext}')]

def create_executable(self) -> None:
source_name = f'{self.lowercase_token}.{self.source_ext}'
Expand Down
10 changes: 8 additions & 2 deletions mesonbuild/templates/valatemplates.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,12 @@
dependency('gobject-2.0'),{dependencies}
]

sources = [{source_files}
]

exe = executable(
'{exe_name}',
'{source_name}',
sources,
dependencies : dependencies,
install : true,
)
Expand Down Expand Up @@ -67,11 +70,14 @@
dependency('gobject-2.0'),{dependencies}
]

sources = [{source_files}
]

# These arguments are only used to build the shared library
# not the executables that use the library.
lib = shared_library(
'foo',
'{source_file}',
sources,
dependencies : dependencies,
install : true,
install_dir : [true, true, true],
Expand Down
Loading
Loading