### Finalizing 3MX Plugin Setup (CMake) Source: https://github.com/projseed/osgplugins-3mx/blob/master/CMakeLists.txt Invokes a custom CMake macro (likely defined elsewhere) to perform the final steps of setting up the 3MX plugin build. Calls the `SETUP_PLUGIN` macro with the plugin name "3mx" to handle the creation of the plugin target using the previously defined source files and configurations. ```CMake SETUP_PLUGIN(3mx) ``` -------------------------------- ### Add 3mx Plugin Directory to OSG CMake Source: https://github.com/projseed/osgplugins-3mx/blob/master/README.md This CMake command registers the 3mx plugin directory with the main OpenSceneGraph build system. It must be added to the osgPlugins/CMakeLists.txt file to ensure the plugin is discovered and built. ```CMake ADD_PLUGIN_DIRECTORY(3mx) ``` -------------------------------- ### Register 3mxb File Extension Alias in OSG Source: https://github.com/projseed/osgplugins-3mx/blob/master/README.md This C++ code snippet adds an alias in the OpenSceneGraph registry so that files with the .3mxb extension are treated the same as .3mx files and loaded by the 3mx plugin. It should be inserted within the osgDB::Registry constructor in Registry.cpp. ```C++ // about line: 220 Registry::Registry() { // ... addFileExtensionAlias("3mxb", "3mx"); // ... } ``` -------------------------------- ### Configuring liblzma Source Files (CMake) Source: https://github.com/projseed/osgplugins-3mx/blob/master/CMakeLists.txt Configures the build to include the liblzma library files. Uses `file(GLOB)` to find source and header files, groups them for IDE presentation using `source_group`, and adds the include directory to the build path. ```CMake file (GLOB LIBLZMA_SRC ./OpenCTM/liblzma/*.c) file (GLOB LIBLZMA_H ./OpenCTM/liblzma/*.h) source_group("liblzma" FILES ${LIBLZMA_SRC} ${LIBLZMA_H} ) include_directories("./OpenCTM/liblzma/") ``` -------------------------------- ### Configuring cJsonObject Source Files (CMake) Source: https://github.com/projseed/osgplugins-3mx/blob/master/CMakeLists.txt Configures the build to include the cJsonObject library files. Explicitly lists source and header files using `SET`, groups them for IDE presentation with `source_group`, and adds the include directory to the build path. ```CMake SET(CJSONOBJECT_SRC ./cJsonObject/CJsonObject.cpp ./cJsonObject/cJSON.c ) SET(CJSONOBJECT_H ./cJsonObject/CJsonObject.hpp ./cJsonObject/cJSON.h ) source_group("cJsonObject" FILES ${CJSONOBJECT_SRC} ${CJSONOBJECT_H} ) include_directories("./cJsonObject/") ``` -------------------------------- ### Configuring OpenCTM Source Files and Definitions (CMake) Source: https://github.com/projseed/osgplugins-3mx/blob/master/CMakeLists.txt Configures the build to include the OpenCTM library files and define a preprocessor macro. Locates OpenCTM source/header files using `file(GLOB)`, groups them, adds the include directory, and defines `OPENCTM_STATIC` for static linking. ```CMake file (GLOB OPENCTM_SRC ./OpenCTM/*.c) file (GLOB OPENCTM_H ./OpenCTM/*.h) source_group("openCTM" FILES ${OPENCTM_SRC} ${OPENCTM_H} ) include_directories("./openCTM/") add_definitions(-DOPENCTM_STATIC) ``` -------------------------------- ### Aggregating Plugin and Dependency Source Files (CMake) Source: https://github.com/projseed/osgplugins-3mx/blob/master/CMakeLists.txt Aggregates all source and header files from the plugin's core and its dependencies. Combines the main plugin source file (`ReaderWriter3MX.cpp`) with the source/header lists from cJsonObject, liblzma, and OpenCTM into final lists (`TARGET_SRC`, `TARGET_H`) for the target. ```CMake SET(TARGET_SRC ReaderWriter3MX.cpp ${CJSONOBJECT_SRC} ${LIBLZMA_SRC} ${OPENCTM_SRC} ) SET(TARGET_H ${CJSONOBJECT_H} ${LIBLZMA_H} ${OPENCTM_H} ) ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.