Cgcmake
CMake modules for common applications related to computer graphics
Install / Use
/learn @chadmv/CgcmakeREADME
cgcmake
CMake modules for common applications related to computer graphics
Sample Usage
Maya Project
|-- CMakeLists.txt
|-- cgcmake
|-- modules
|-- FindMaya.cmake
|-- src
|-- CMakeLists.txt
|-- pluginMain.cpp
|-- sampleCmd.cpp
|-- sampleCmd.h
Root CMakeLists.txt
cmake_minimum_required(VERSION 3.1...3.15)
if(${CMAKE_VERSION} VERSION_LESS 3.12)
cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION})
endif()
cmake_policy(SET CMP0048 NEW)
project(MayaProjectName VERSION 1.0 DESCRIPTION "My Maya Plug-in" LANGUAGES CXX)
set(CMAKE_INSTALL_PREFIX ${CMAKE_CURRENT_SOURCE_DIR})
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cgcmake/modules)
add_subdirectory(src)
src/CMakeLists.txt
set(SOURCE_FILES
"pluginMain.cpp"
"sampleCmd.h"
"sampleCmd.cpp"
)
find_package(Maya REQUIRED)
add_library(${PROJECT_NAME} SHARED ${SOURCE_FILES})
target_link_libraries(${PROJECT_NAME} PRIVATE Maya::Maya)
target_include_directories(${PROJECT_NAME}
PRIVATE Maya::Maya
PUBLIC "${CMAKE_CURRENT_BINARY_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}"
)
MAYA_PLUGIN(${PROJECT_NAME})
install(TARGETS ${PROJECT_NAME} ${MAYA_TARGET_TYPE} DESTINATION plug-ins/${MAYA_VERSION})
Windows
In a Command Prompt from the root of the project
Pre-Maya 2020
mkdir build.2019
cd build.2019
cmake -A x64 -T v140 -DMAYA_VERSION=2019 ../
cmake --build . --target install --config Release
Maya 2020
mkdir build.2020
cd build.2020
cmake -A x64 -T v141 -DMAYA_VERSION=2020 ../
cmake --build . --target install --config Release
Related Skills
node-connect
343.1kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
90.0kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
343.1kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
343.1kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
