-
-
Notifications
You must be signed in to change notification settings - Fork 119
Tools for the mmg libraries users
You can use:
- the FindMmg.cmake file to automatically find the mmg library;
- the FindMmg2d.cmake file to automatically find the mmg2d library;
- the FindMmgs.cmake file to automatically find the mmgs library;
- the FindMmg3d.cmake file to automatically find the mmg3d library.
If the package fails, you can help it by:
- setting the MMG_DIR environment variable to your mmg directory path:
export MMG_DIR=<your_mmg_directory_path>
- or setting the MMG_DIR CMake variable to your mmg directory path:
SET(MMG_DIR <your_mmg_directory_path>)
The FindMmg.cmake package defines the MMG_INCLUDE_DIR and the MMG_LIBRARY variables.
To link a program named YOUR_TARGET with the mmg library using CMake, just add the following lines in your CMakeLists.txt:
INCLUDE(FindMmg.cmake)
INCLUDE_DIRECTORIES(${MMG_INCLUDE_DIR})
TARGET_LINK_LIBRARIES( ${YOUR_TARGET} ${MMG_LIBRARY})
The FindMmg2d.cmake package defines the MMG2D_INCLUDE_DIR and the MMG2D_LIBRARY variables.
To link a program named YOUR_TARGET with the mmg2d library using CMake, just add the following lines in your CMakeLists.txt:
INCLUDE(FindMmg2d.cmake)
INCLUDE_DIRECTORIES(${MMG2D_INCLUDE_DIR})
TARGET_LINK_LIBRARIES( ${YOUR_TARGET} ${MMG2D_LIBRARY})
The FindMmgs.cmake package defines the MMGS_INCLUDE_DIR and the MMGS_LIBRARY variables.
To link a program named YOUR_TARGET with the mmgs library using CMake, just add the following lines in your CMakeLists.txt:
INCLUDE(FindMmgs.cmake)
INCLUDE_DIRECTORIES(${MMGS_INCLUDE_DIR})
TARGET_LINK_LIBRARIES( ${YOUR_TARGET} ${MMGS_LIBRARY})
The FindMmg3d.cmake package defines the MMG3D_INCLUDE_DIR and the MMG3D_LIBRARY variables.
To link a program named YOUR_TARGET with the mmg3d library using CMake, just add the following lines in your CMakeLists.txt:
INCLUDE(FindMmg3d.cmake)
INCLUDE_DIRECTORIES(${MMG3D_INCLUDE_DIR})
TARGET_LINK_LIBRARIES( ${YOUR_TARGET} ${MMG3D_LIBRARY})
You can find examples of the use of the mmg libraries in the [libexamples][libexamples] subfolder (see the projects source tree section of the wiki for the description of the libexamples directory).