-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
122 additions
and
219 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
project('TwistSpline', 'cpp') | ||
|
||
maya_dep = dependency('maya') | ||
maya_name_suffix = maya_dep.get_variable('name_suffix') | ||
maya_version = maya_dep.get_variable('maya_version') | ||
|
||
source_files = [ | ||
'src/pluginMain.cpp', | ||
'src/drawOverride.cpp', | ||
'src/twistSplineData.cpp', | ||
'src/twistSplineNode.cpp', | ||
'src/riderConstraint.cpp', | ||
'src/twistTangentNode.cpp', | ||
'src/twistMultiTangentNode.cpp', | ||
] | ||
|
||
harm_inc = include_directories(['src']) | ||
|
||
outlib = shared_library( | ||
meson.project_name(), | ||
source_files, | ||
install: true, | ||
install_dir : meson.global_source_root() / 'output_Maya' + maya_version, | ||
include_directories : harm_inc, | ||
dependencies : maya_dep, | ||
name_suffix : maya_name_suffix, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
setlocal | ||
|
||
SET MAYA_VERSION=2024 | ||
REM "vs" "ninja" | ||
REM use VS for the debugger, otherwise use NINJA | ||
REM Until I figure out how to debug using nvim | ||
SET BACKEND=vs | ||
REM "debug" "debugoptimized" "release" | ||
SET BUILDTYPE=debug | ||
SET BUILDDIR=mayabuild_%BUILDTYPE%_%MAYA_VERSION%_%BACKEND% | ||
|
||
if not exist %BUILDDIR%\ ( | ||
meson setup -Dmaya:maya_version=%MAYA_VERSION% --buildtype %BUILDTYPE% --vsenv %BUILDDIR% --backend %BACKEND% | ||
) | ||
|
||
if exist %BUILDDIR%\ ( | ||
meson compile -C %BUILDDIR% | ||
meson install -C %BUILDDIR% | ||
) | ||
|
||
pause |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
project('maya', 'cpp') | ||
|
||
maya_version = get_option('maya_version') | ||
|
||
os_name = build_machine.system() | ||
|
||
maya_inc_suffix = 'include' | ||
maya_lib_suffix = 'lib' | ||
maya_bin_suffix = 'bin' | ||
|
||
maya_compile_args = ['-DREQUIRE_IOSTREAM', '-D_BOOL'] | ||
maya_link_args = [] | ||
|
||
if os_name == 'windows' | ||
maya_install_base = 'c:/Program Files/Autodesk' | ||
maya_plugin_ext = 'mll' | ||
maya_compile_args += ['-DNT_PLUGIN'] | ||
maya_link_args = ['/export:initializePlugin', '/export:uninitializePlugin'] | ||
elif os_name == 'darwin' | ||
maya_install_base = '/Applications/Autodesk' | ||
maya_inc_suffix = 'devkit/include' | ||
maya_lib_suffix = 'Maya.app/Contents/MacOS' | ||
maya_bin_suffix = 'Maya.app/Contents/bin' | ||
maya_plugin_ext = 'bundle' | ||
maya_compile_args += ['-DOSMac_'] | ||
if meson.get_compiler('cpp').get_id() == 'clang' | ||
maya_compile_args += ['-std', 'c++0x', '-stdlib', 'libstdc++'] | ||
endif | ||
elif os_name == 'linux' | ||
maya_install_base = '/usr/autodesk' | ||
maya_plugin_ext = 'so' | ||
maya_compile_args += ['-DLINUX', '-fPIC'] | ||
else | ||
error('Incompatible operating system') | ||
endif | ||
|
||
maya_install_path = maya_install_base / ('Maya' + maya_version) | ||
|
||
maya_bin_dir = maya_install_path / maya_bin_suffix | ||
maya_bin = find_program('maya', dirs : maya_bin_dir) | ||
|
||
maya_inc_dir = maya_install_path / maya_inc_suffix | ||
maya_inc = include_directories(maya_inc_dir) | ||
|
||
maya_lib_dir = maya_install_path / maya_lib_suffix | ||
cmplr = meson.get_compiler('cpp') | ||
maya_libs = [ | ||
cmplr.find_library('Foundation', dirs : maya_lib_dir), | ||
cmplr.find_library('OpenMaya', dirs : maya_lib_dir), | ||
cmplr.find_library('OpenMayaAnim', dirs : maya_lib_dir), | ||
cmplr.find_library('OpenMayaFX', dirs : maya_lib_dir), | ||
cmplr.find_library('OpenMayaRender', dirs : maya_lib_dir), | ||
cmplr.find_library('OpenMayaUI', dirs : maya_lib_dir), | ||
cmplr.find_library('clew', dirs : maya_lib_dir), | ||
] | ||
|
||
maya_dep = declare_dependency( | ||
dependencies : maya_libs, | ||
include_directories : maya_inc, | ||
variables : {'name_suffix' : maya_plugin_ext, 'maya_version' : maya_version}, | ||
compile_args : maya_compile_args, | ||
link_args : maya_link_args, | ||
|
||
) | ||
|
||
meson.override_dependency('maya', maya_dep) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
option( | ||
'maya_version', | ||
type : 'string', | ||
value : '2024', | ||
description : 'The version of Maya to compile for', | ||
yield : true, | ||
) |