Code Monkey home page Code Monkey logo

vfxcmake's Introduction

vfxcmake

Cmake Find modules for common vfx software, and general Cmake utility code, licensed under LGPL.

Please fork this project, improve it, and add new applications!

Maya Example

# can optionally specify a version: FIND_PACKAGE( Maya 2012 REQUIRED )
FIND_PACKAGE( Maya REQUIRED )
# find a local install of Qt that matches the version required for Maya, as determined above
FIND_PACKAGE( Qt4 ${MAYA_QT_VERSION_SHORT} REQUIRED )

# load the Qt tools
INCLUDE( ${QT_USE_FILE} )

SET( myplugin_SRCS
    ../src/QMyCoreLib.cpp
)

SET( myplugin_MOC_HDRS
  ../src/QMyCoreLib.h
)

# generate the Qt moc files
QT4_WRAP_CPP( myplugin_MOC_SRCS ${myplugin_MOC_HDRS} )

# the maya-specific plugin code (w/ initializePlugin, etc)
SET( plugin_SRCS plugin.cpp )

INCLUDE_DIRECTORIES( ${PUBLIC_INCLUDE_DIRS} ${myplugin_proj_SOURCE_DIR}/src ${MAYA_INCLUDE_DIR} )

# create the plugin
ADD_LIBRARY( myplugin_plugin SHARED
  ${plugin_SRCS}
  ${myplugin_SRCS} ${myplugin_MOC_SRCS}
)

TARGET_LINK_LIBRARIES( myplugin_plugin
   ${MAYA_Foundation_LIBRARY} ${MAYA_OpenMaya_LIBRARY} ${MAYA_OpenMayaUI_LIBRARY}
   ${QT_LIBRARIES}
)

SET_TARGET_PROPERTIES( myplugin_plugin PROPERTIES 
  OUTPUT_NAME myplugin
  CLEAN_DIRECT_OUTPUT 1
)

# this is a macro defined in FindMaya that sets up our plugin with standard Maya build settings
MAYA_SET_PLUGIN_PROPERTIES( myplugin_plugin )

vfxcmake's People

Contributors

caron avatar chadrik avatar dictoon avatar drakeguan avatar jhoolmans avatar nerdvegas avatar nrusch avatar nyue avatar sebastianelsner avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.