### Install Application Icons Source: https://github.com/openchemistry/avogadroapp/blob/master/avogadro/CMakeLists.txt Installs various icon files for the application and installer into the share/icons directory. ```cmake install(FILES "icons/avogadro.png" DESTINATION "${CMAKE_INSTALL_PREFIX}/share/icons") install(FILES "icons/avogadro.ico" DESTINATION "${CMAKE_INSTALL_PREFIX}/share/icons") install(FILES "icons/doc.ico" DESTINATION "${CMAKE_INSTALL_PREFIX}/share/icons") install(FILES "icons/cml.ico" DESTINATION "${CMAKE_INSTALL_PREFIX}/share/icons") install(FILES "icons/cjson.ico" DESTINATION "${CMAKE_INSTALL_PREFIX}/share/icons") ``` ```cmake install(FILES "icons/Avogadro2-310x150.png" DESTINATION "${CMAKE_INSTALL_PREFIX}/share/icons") install(FILES "icons/Avogadro2_44.png" DESTINATION "${CMAKE_INSTALL_PREFIX}/share/icons") install(FILES "icons/Avogadro2_71.png" DESTINATION "${CMAKE_INSTALL_PREFIX}/share/icons") install(FILES "icons/Avogadro2_150.png" DESTINATION "${CMAKE_INSTALL_PREFIX}/share/icons") install(FILES "icons/Avogadro2_310.png" DESTINATION "${CMAKE_INSTALL_PREFIX}/share/icons") ``` -------------------------------- ### Installing Unix Desktop Integration Files Source: https://github.com/openchemistry/avogadroapp/blob/master/avogadro/CMakeLists.txt Installs the desktop entry file and metainfo XML for Linux desktop environments. ```cmake install(FILES "metainfo/org.openchemistry.Avogadro2.desktop" DESTINATION "${INSTALL_XDG_APPS_DIR}") install(FILES "metainfo/org.openchemistry.Avogadro2.metainfo.xml" DESTINATION "${CMAKE_INSTALL_PREFIX}/share/metainfo") ``` -------------------------------- ### Configure Installer Scripts Source: https://github.com/openchemistry/avogadroapp/blob/master/avogadro/CMakeLists.txt Configures NSI and MSIX installer scripts using template files, ensuring they are generated with the correct installation prefix. ```cmake configure_file("${AvogadroApp_SOURCE_DIR}/cmake/avogadro2.nsi.in" "${CMAKE_INSTALL_PREFIX}/avogadro2.nsi" @ONLY) configure_file("${AvogadroApp_SOURCE_DIR}/cmake/AppxManifest.xml.in" "${CMAKE_INSTALL_PREFIX}/AppxManifest.xml" @ONLY) ``` -------------------------------- ### System Library Installation and Bundling Source: https://github.com/openchemistry/avogadroapp/blob/master/avogadro/lastinstall/CMakeLists.txt Installs required system libraries and fixes up the application bundle. This ensures all necessary runtime components are included with the application. ```cmake set(CMAKE_INSTALL_UCRT_LIBRARIES TRUE) include(InstallRequiredSystemLibraries) if (INSTALL_BUNDLE_FILES) # Fixup the bundle install(CODE " include(BundleUtilities) get_property(bundle TARGET avogadro PROPERTY LOCATION_RELEASE) fixup_bundle(\"${bundle}/..\" \"${plugins}\" \"${dirs}\") " COMPONENT Runtime) endif() ``` -------------------------------- ### Install Avogadro Executable Source: https://github.com/openchemistry/avogadroapp/blob/master/avogadro/CMakeLists.txt Installs the 'avogadro' target to the runtime destination directory and the bundle destination. ```cmake install(TARGETS avogadro RUNTIME DESTINATION ${INSTALL_RUNTIME_DIR} BUNDLE DESTINATION . ) ``` -------------------------------- ### Install Qt Translation Files Source: https://github.com/openchemistry/avogadroapp/blob/master/avogadro/CMakeLists.txt Installs Qt translation files (.qm) to the application's internationalization directory. This ensures that the application can be displayed in different languages. ```cmake get_filename_component(_qttranslationdir "${Qt${QT_VERSION}_DIR}/../../../translations" ABSOLUTE) message(STATUS "Install Qt translations ${_qttranslationdir}") install(DIRECTORY "${_qttranslationdir}/" DESTINATION "${INSTALL_DATA_DIR}/avogadro2/i18n" FILES_MATCHING PATTERN "qt_*.qm" PATTERN "qtbase*.qm" # technically, this also copies qt_help.* but that's not a big deal ) ``` -------------------------------- ### Installing Unix Application Icons Source: https://github.com/openchemistry/avogadroapp/blob/master/avogadro/CMakeLists.txt Installs Avogadro application icons in various sizes and formats to standard Freedesktop.org icon directories. ```cmake install(FILES "icons/avogadro.png" DESTINATION "${INSTALL_XDG_ICON_DIR}/hicolor/32x32/apps" RENAME "org.openchemistry.Avogadro2.png") install(FILES "icons/avogadro.png" DESTINATION "${INSTALL_XDG_ICON_DIR}/hicolor/16x16@2/apps" RENAME "org.openchemistry.Avogadro2.png") install(FILES "icons/avogadro2_64.png" DESTINATION "${INSTALL_XDG_ICON_DIR}/hicolor/64x64/apps" RENAME "org.openchemistry.Avogadro2.png") install(FILES "icons/avogadro2_64.png" DESTINATION "${INSTALL_XDG_ICON_DIR}/hicolor/32x32@2/apps" RENAME "org.openchemistry.Avogadro2.png") install(FILES "icons/avogadro2_128.png" DESTINATION "${INSTALL_XDG_ICON_DIR}/hicolor/128x128/apps" RENAME "org.openchemistry.Avogadro2.png") install(FILES "icons/avogadro2_256.png" DESTINATION "${INSTALL_XDG_ICON_DIR}/hicolor/256x256/apps" RENAME "org.openchemistry.Avogadro2.png") install(FILES "icons/avogadro2.svg" DESTINATION "${INSTALL_XDG_ICON_DIR}/hicolor/scalable/apps" RENAME "org.openchemistry.Avogadro2.svg") ``` -------------------------------- ### Executable Naming and Path Setup Source: https://github.com/openchemistry/avogadroapp/blob/master/avogadro/lastinstall/CMakeLists.txt Configures the executable name and path based on the operating system and target output name. Handles platform-specific prefixes and suffixes for executables. ```cmake if((APPLE OR WIN32) AND NOT ${CMAKE_VERSION} VERSION_LESS 2.8.8) set(pfx "") if(NOT APPLE) set(pfx "bin/") endif() set(sfx "") if(APPLE) set(sfx ".app") elseif(WIN32) set(sfx ".exe") endif() get_target_property(output_name avogadro OUTPUT_NAME) if(output_name) set(exe "${pfx}${output_name}${sfx}") else() set(exe "${pfx}avogadro${sfx}") endif() set(dirs "") if(CMAKE_PREFIX_PATH) foreach(dir ${CMAKE_PREFIX_PATH}) list(APPEND dirs "${dir}/bin" "${dir}/lib") endforeach() endif() endif() ``` -------------------------------- ### Installing macOS Language Bundles Source: https://github.com/openchemistry/avogadroapp/blob/master/avogadro/CMakeLists.txt Iterates through detected languages and creates corresponding .lproj directories within the macOS bundle. ```cmake foreach(lang ${LANGUAGES}) set( MAC_LANG_DIR "${CMAKE_INSTALL_PREFIX}/Resources/${lang}.lproj" ) install(CODE "EXECUTE_PROCESS(COMMAND mkdir ${MAC_LANG_DIR} ERROR_QUIET)") endforeach() ``` -------------------------------- ### Configure 3DConnexion Build Options Source: https://github.com/openchemistry/avogadroapp/blob/master/avogadro/CMakeLists.txt Configures compiler definitions and include directories for 3DConnexion support, with platform-specific flags and installation steps. ```cmake if(USE_3DCONNEXION AND (WIN32 OR APPLE)) target_compile_definitions(avogadro PUBLIC _3DCONNEXION) target_include_directories(avogadro PUBLIC "${AvogadroApp_SOURCE_DIR}/thirdparty/3DConnexion/inc") if(APPLE) target_compile_definitions(avogadro PUBLIC __APPLE__) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdeclspec") elseif(WIN32) install(FILES "icons/3dx_pivot.png" DESTINATION "${CMAKE_INSTALL_BINDIR}/img") endif() endif() ``` -------------------------------- ### Setting macOS Resource File Properties Source: https://github.com/openchemistry/avogadroapp/blob/master/avogadro/CMakeLists.txt Specifies the installation location for various icon files within the macOS application bundle. ```cmake set_source_files_properties(icons/Assets.car PROPERTIES MACOSX_PACKAGE_LOCATION Resources) set_source_files_properties(icons/AppIcon.icns PROPERTIES MACOSX_PACKAGE_LOCATION Resources) set_source_files_properties(icons/doc.icns PROPERTIES MACOSX_PACKAGE_LOCATION Resources) set_source_files_properties(icons/cjson.icns PROPERTIES MACOSX_PACKAGE_LOCATION Resources) set_source_files_properties(icons/cml.icns PROPERTIES MACOSX_PACKAGE_LOCATION Resources) ``` -------------------------------- ### Open Babel Plugin Handling for macOS Source: https://github.com/openchemistry/avogadroapp/blob/master/avogadro/lastinstall/CMakeLists.txt Finds Open Babel executables and collects its plugins for installation on macOS. This ensures that Open Babel's functionality is available within the Avogadro bundle. ```cmake find_program(OBABEL_EXE obabel) if(INSTALL_BUNDLE_FILES AND OBABEL_EXE AND APPLE) get_filename_component(BABEL_DIR "${OBABEL_EXE}" PATH) file(GLOB BABEL_PLUGINS RELATIVE ${BABEL_DIR}/../lib/openbabel/ ${BABEL_DIR}/../lib/openbabel/*.so) foreach(plugin ${BABEL_PLUGINS}) list(APPEND ob_plugins ${INSTALL_LIBRARY_DIR}/openbabel/${plugin}) endforeach() endif() ``` -------------------------------- ### OpenSSL Dependency for Windows Source: https://github.com/openchemistry/avogadroapp/blob/master/avogadro/lastinstall/CMakeLists.txt Finds and configures OpenSSL for Windows builds. Sets the OpenSSL root directory and installs necessary DLLs to the runtime directory. ```cmake if(WIN32) find_package(OpenSSL REQUIRED) if (DEFINED OPENSSL_FOUND) set(OPENSSL_ROOT_DIR "${OPENSSL_INCLUDE_DIR}/.." CACHE PATH "OpenSSL root directory") message(STATUS "Using OpenSSL from ${OPENSSL_ROOT_DIR}") file(GLOB OPENSSL_DLL ${OPENSSL_ROOT_DIR}/bin/*.dll) install(FILES ${OPENSSL_DLL} DESTINATION ${INSTALL_RUNTIME_DIR}) endif() endif() ``` -------------------------------- ### Add lastinstall Subdirectory in CMake Source: https://github.com/openchemistry/avogadroapp/blob/master/avogadro/CMakeLists.txt Ensures that the 'lastinstall' subdirectory is processed last in the CMake build configuration. This is crucial for the 'fixup_bundle' command to operate correctly after all other installation steps. ```cmake add_subdirectory(lastinstall) ``` -------------------------------- ### Configure Qt Testing Source: https://github.com/openchemistry/avogadroapp/blob/master/avogadro/CMakeLists.txt Finds and configures the QtTesting package if testing is enabled and Qt version is 6. It includes necessary directories and defines a preprocessor macro for QtTesting. ```cmake if(ENABLE_TESTING) if(QT_VERSION EQUAL 6) find_package(Qt6 COMPONENTS Test REQUIRED) endif() find_package(QtTesting REQUIRED NO_MODULE) include_directories(${QtTesting_INCLUDE_DIRS}) link_directories(${QtTesting_LIBRARY_DIR}) add_definitions(-DQTTESTING) endif() ``` -------------------------------- ### Link Testing Library Source: https://github.com/openchemistry/avogadroapp/blob/master/avogadro/CMakeLists.txt Conditionally links the 'qttesting' library if testing is enabled for the project. ```cmake if(ENABLE_TESTING) target_link_libraries(avogadro qttesting) endif() ``` -------------------------------- ### Configure Doxygen Documentation Generation Source: https://github.com/openchemistry/avogadroapp/blob/master/docs/CMakeLists.txt This snippet configures Doxygen to generate documentation. It finds the Doxygen package, sets the source and output directories, configures the Doxyfile using a template, and adds a custom target 'documentation' to execute Doxygen. ```cmake find_package(Doxygen REQUIRED) set(doxygen_source_dirs "${ChemData_SOURCE_DIR}/avogadro") set(doxygen_output_dir "${ChemData_BINARY_DIR}/docs") configure_file("${CMAKE_CURRENT_SOURCE_DIR}/doxyfile.in" "${CMAKE_CURRENT_BINARY_DIR}/doxyfile") add_custom_target(documentation COMMAND ${CMAKE_COMMAND} -E remove_directory ${CMAKE_CURRENT_BINARY_DIR}/html COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/doxyfile) ``` -------------------------------- ### Plugin Collection for Bundling Source: https://github.com/openchemistry/avogadroapp/blob/master/avogadro/lastinstall/CMakeLists.txt Collects plugin locations for bundling, including core image formats for macOS and Windows. Handles different Qt versions for plugin discovery. ```cmake set(plugins "") foreach(plugin ${AvogadroLibs_PLUGINS}) get_property(location TARGET ${plugin} PROPERTY LOCATION) list(APPEND plugins ${location}) endforeach() # make sure to include the core image formats # likely only be required on Mac / Windows since Qt package on Unix provides if(APPLE OR WIN32) # JPG BMP, WebP, GIF plus default of PNG, etc. # .. for whatever reason, they don't have a Qt::QJpegPlugin # .. only the versioned Qt6::QJpegPlugin, etc. if(QT_VERSION EQUAL 6) foreach(qt_plugin Qt6::QJpegPlugin Qt6::QGifPlugin) get_property(location TARGET ${qt_plugin} PROPERTY LOCATION_RELEASE) list(APPEND plugins ${location}) endforeach() endif() endif() ``` -------------------------------- ### Adding macOS Bundle Resources Source: https://github.com/openchemistry/avogadroapp/blob/master/avogadro/CMakeLists.txt Appends various icon files to the list of source files for the macOS bundle. ```cmake list(APPEND avogadro_srcs icons/Assets.car) list(APPEND avogadro_srcs icons/AppIcon.icns) list(APPEND avogadro_srcs icons/doc.icns) list(APPEND avogadro_srcs icons/cml.icns) list(APPEND avogadro_srcs icons/cjson.icns) ``` -------------------------------- ### Handle Static Builds with HDF5 Source: https://github.com/openchemistry/avogadroapp/blob/master/avogadro/CMakeLists.txt Finds the HDF5 library with C components if the application is being built as a static library (not shared). This ensures HDF5 is available for static builds. ```cmake if(NOT BUILD_SHARED_LIBS) find_package(HDF5 REQUIRED COMPONENTS C) endif() ``` -------------------------------- ### Enable RPC Subdirectory Source: https://github.com/openchemistry/avogadroapp/blob/master/avogadro/CMakeLists.txt Adds the 'rpc' subdirectory to the build and defines the Avogadro_ENABLE_RPC preprocessor macro if the Avogadro_ENABLE_RPC option is enabled. This is used for Remote Procedure Call functionality. ```cmake if(Avogadro_ENABLE_RPC) add_subdirectory(rpc) list(APPEND avogadro_srcs rpclistener.cpp rpclistener.h) add_definitions("-DAvogadro_ENABLE_RPC") endif() ``` -------------------------------- ### Add 3DConnexion Source Files Source: https://github.com/openchemistry/avogadroapp/blob/master/avogadro/CMakeLists.txt Appends source files for 3DConnexion controller support if the feature is enabled and the platform is Windows or macOS. ```cmake list(APPEND avogadro_srcs icons/3dx_pivot.png) list(APPEND avogadro_srcs tdxcontroller.cpp) list(APPEND avogadro_srcs "${AvogadroApp_SOURCE_DIR}/thirdparty/3DConnexion/src/navlib_load.cpp") list(APPEND avogadro_srcs "${AvogadroApp_SOURCE_DIR}/thirdparty/3DConnexion/src/navlib_stub.c") set_source_files_properties(icons/3dx_pivot.png PROPERTIES MACOSX_PACKAGE_LOCATION Resources) ``` -------------------------------- ### Link Core Avogadro Libraries Source: https://github.com/openchemistry/avogadroapp/blob/master/avogadro/CMakeLists.txt Links the core Avogadro libraries, including Qt OpenGL, QtGui, and QtPlugins, to the 'avogadro' executable. ```cmake target_link_libraries(avogadro Avogadro::QtOpenGL Avogadro::QtGui Avogadro::QtPlugins) ``` -------------------------------- ### Include Binary Directory Source: https://github.com/openchemistry/avogadroapp/blob/master/avogadro/CMakeLists.txt Adds the current binary directory to the include path. This is necessary for finding UI file headers when building the application. ```cmake include_directories(${CMAKE_CURRENT_BINARY_DIR}) ``` -------------------------------- ### Adding Windows Resource File Source: https://github.com/openchemistry/avogadroapp/blob/master/avogadro/CMakeLists.txt Appends the Avogadro resource file (.rc) to the list of source files for Windows builds. ```cmake list(APPEND avogadro_srcs icons/avogadro.rc) ``` -------------------------------- ### Define Executable Target Source: https://github.com/openchemistry/avogadroapp/blob/master/avogadro/CMakeLists.txt Defines the main executable target 'avogadro' with platform-specific bundle options and links necessary Qt libraries. ```cmake add_executable(avogadro WIN32 MACOSX_BUNDLE ${avogadro_srcs} ${ui_srcs} ${rcc_srcs}) target_link_libraries(avogadro Qt::Widgets Qt::Network Qt::Concurrent) ``` -------------------------------- ### Setting macOS Bundle Properties Source: https://github.com/openchemistry/avogadroapp/blob/master/avogadro/CMakeLists.txt Configures essential properties for the macOS application bundle, including icon, version, and identifier. ```cmake set(MACOSX_BUNDLE_ICON_FILE AppIcon) set(MACOSX_BUNDLE_BUNDLE_VERSION "${AvogadroApp_VERSION}") set(MACOSX_BUNDLE_INFO_STRING "Avogadro - version ${AvogadroApp_VERSION}") # Change following line to point to actual icns file in bundle. set(MACOSX_BUNDLE_GUI_IDENTIFIER "cc.avogadro") set(MACOSX_BUNDLE_BUNDLE_NAME "Avogadro") ``` -------------------------------- ### Mac OS X Specific Configurations Source: https://github.com/openchemistry/avogadroapp/blob/master/avogadro/CMakeLists.txt Placeholder for Mac OS X specific configurations. This section is intended for platform-specific settings like icons or Objective-C++ code, though the current implementation is commented out. ```cmake if(APPLE) # add some Objective-C++ code # list(APPEND avogadro_srcs mac.mm) # for all the translations, create a .lproj directory # Migrated from Avo 1.x - contributed by Geoff Hutchison # We're assuming that there will never be an libavogadro translation # without a corresponding avogadro one. # (Fairly safe assumption) endif() ``` -------------------------------- ### Extracting Language Codes from QM Files Source: https://github.com/openchemistry/avogadroapp/blob/master/avogadro/CMakeLists.txt Uses CMake's GLOB and REGEX commands to find and extract language codes from .qm translation files. ```cmake FILE(GLOB avogadro_QM "${INSTALL_DATA_DIR}/avogadro2/i18n/*.qm") string(REGEX MATCHALL "-[a-z]+\.qm" langresult "${avogadro_QM}") string(REGEX REPLACE "-[^.]+\\.qm" "\1" languages "${langresult}") # This one gives us languages for country codes (e.g., avogadro_zh_CN.ts) string(REGEX MATCHALL "-[a-z]+_[A-Z]+\\.qm" langresult "${avogadro_QM}") string(REGEX REPLACE "-([^_]+_[^.]+)\\.qm" "\1" fulllangs "${langresult}") set (LANGUAGES "${languages};${fulllangs};en;en_US") ``` -------------------------------- ### Enable Automatic MOC Source: https://github.com/openchemistry/avogadroapp/blob/master/avogadro/CMakeLists.txt Enables the Meta-Object Compiler (MOC) for the 'avogadro' target, which is essential for Qt's meta-object system. ```cmake set_target_properties(avogadro PROPERTIES AUTOMOC TRUE) ``` -------------------------------- ### Link Qt6 Libraries Source: https://github.com/openchemistry/avogadroapp/blob/master/avogadro/CMakeLists.txt Conditionally links Qt6 OpenGL and OpenGLWidgets libraries if the project is configured to use Qt version 6. ```cmake if(QT_VERSION EQUAL 6) target_link_libraries(avogadro Qt6::OpenGL Qt6::OpenGLWidgets) endif() ``` -------------------------------- ### Set Output Name for Executable Source: https://github.com/openchemistry/avogadroapp/blob/master/avogadro/CMakeLists.txt Sets the output name for the 'avogadro' executable, using a bundle name on macOS and 'avogadro2' on other platforms. ```cmake if(APPLE) set_target_properties(avogadro PROPERTIES OUTPUT_NAME ${MACOSX_BUNDLE_NAME}) else() set_target_properties(avogadro PROPERTIES OUTPUT_NAME "avogadro2") endif() ``` -------------------------------- ### Configure Windows Linker Flags Source: https://github.com/openchemistry/avogadroapp/blob/master/avogadro/CMakeLists.txt Sets linker flags for Windows to exclude the default MSVCRTD library, potentially for static CRT usage. ```cmake if(WIN32) set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /NODEFAULTLIB:MSVCRTD") endif() ``` -------------------------------- ### Locate Avogadro Data Root Source: https://github.com/openchemistry/avogadroapp/blob/master/tests/CMakeLists.txt Searches for the Avogadro data repository, which is used for testing. It checks common locations and environment variables. ```cmake find_path(AVOGADRO_DATA_ROOT .avogadro.data ${AvogadroApp_SOURCE_DIR}/../avogadrodata $ENV{AVOGADRO_DATA_ROOT} DOC "The repository for data used for testing." ) ``` -------------------------------- ### Add Avogadro Tests Source: https://github.com/openchemistry/avogadroapp/blob/master/tests/CMakeLists.txt Iterates through found XML test files, extracts their names, and adds them as individual tests to be run by CTest. Each test is named 'avogadro-' and executed using the 'avogadro' command with specific arguments. ```cmake foreach(xml ${test_xml}) get_filename_component(name "${xml}" NAME_WE) message("Adding test: ${name} from XML") add_test(NAME avogadro-${name} COMMAND avogadro --disable-settings --test-file "${AVOGADRO_DATA}/tests/avogadro/xml/${xml}") # Ensure we pass in an absolute path to the prefix so that we find the plugins set_tests_properties(avogadro-${name} PROPERTIES ENVIRONMENT "AVOGADRO_PLUGIN_DIR=${AvogadroLibs_INSTALL_PREFIX}") endforeach() ``` -------------------------------- ### Glob Test XML Files Source: https://github.com/openchemistry/avogadroapp/blob/master/tests/CMakeLists.txt Finds all XML files within the specified test directory relative to the Avogadro data root. These files are used to define individual tests. ```cmake file(GLOB test_xml RELATIVE "${AVOGADRO_DATA}/tests/avogadro/xml" "${AVOGADRO_DATA}/tests/avogadro/xml/*.xml") ``` -------------------------------- ### Find Avogadro Libraries Source: https://github.com/openchemistry/avogadroapp/blob/master/tests/CMakeLists.txt Locates the Avogadro libraries required for the project. The 'REQUIRED' keyword ensures the build fails if libraries are not found. ```cmake find_package(AvogadroLibs REQUIRED NO_MODULE) ``` -------------------------------- ### Link AvogadroRPC Library Source: https://github.com/openchemistry/avogadroapp/blob/master/avogadro/CMakeLists.txt Conditionally links the AvogadroRPC library if Avogadro's RPC (Remote Procedure Call) feature is enabled. ```cmake if(Avogadro_ENABLE_RPC) target_link_libraries(avogadro AvogadroRPC) endif() ``` -------------------------------- ### Set Avogadro Data Path Source: https://github.com/openchemistry/avogadroapp/blob/master/tests/CMakeLists.txt Sets the AVOGADRO_DATA variable based on whether the data root was found. If not found, it prints an error message and returns. ```cmake if(AVOGADRO_DATA_ROOT) set(AVOGADRO_DATA ${AVOGADRO_DATA_ROOT}) else() message("No data root found, please set to run the tests.") return() endif() ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.