Menu

Using MathGL in a CMake build process

Anonymous
2014-04-17
2014-04-18
  • Anonymous

    Anonymous - 2014-04-17

    Hi,

    has anybody the plotting library MathGl included into the CMake process? Under https://groups.google.com/forum/#!topic/mathgl/3MFOIqTsyKE I found a FindMathGL.cmake which I evoked in cmakelist.txt:

    list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
    find_package(MathGL REQUIRED)

    It stops with: CMake Error at function/safety_trajectoryplanning_conti/ros/cmake/FindMathGL.cmake:67 (MESSAGE): Cannot determine MathGL version: mgl2/config.h parse error -- Configuring incomplete, errors occurred!

    It seems, that the version info is since 1.11 not anymore in config.h but in define.h with #define MGL_VER2 1.0.

    Normally the step in cmakelists.txt are:
    find_package(MathGL 1.11 GLUT REQUIRED)
    include_directories(${MATHGL_INCLUDE_DIRS})
    add_executable(myexe main.cpp)
    target_link_libraries(myexe ${MATHGL_LIBRARIES})

    for 1.11 (I'm using 2.1 because of an older cmake version in my system.)

     

Anonymous
Anonymous

Add attachments
Cancel