Commit d0037fe7 authored by Joseph Mirabel's avatar Joseph Mirabel Committed by Joseph Mirabel
Browse files

Get qtversion from gepetto-viewer-corba

parent 9f0ce08c
......@@ -25,14 +25,30 @@ INCLUDE(cmake/base.cmake)
INCLUDE(cmake/boost.cmake)
INCLUDE(cmake/python.cmake)
# Tells pkg-config to read qtversion from pkg config file.
LIST(APPEND PKG_CONFIG_ADDITIONAL_VARIABLES qtversion)
SET(PROJECT_NAME "hpp-gui")
SET(PROJECT_URL "https://github.com/jmirabel/hpp-gui")
SET(PROJECT_DESCRIPTION "Graphical interface for HPP ")
SET(USE_QT4 FALSE CACHE BOOL "Use Qt4 instead of Qt5")
SETUP_PROJECT()
ADD_REQUIRED_DEPENDENCY("gepetto-viewer-corba >= 1.3")
# Get desired Qt version
string(REPLACE "." ";" DESIRED_QT_VERSION_LIST ${GEPETTO_VIEWER_CORBA_QTVERSION})
list(GET DESIRED_QT_VERSION_LIST 0 DESIRED_QT_VERSION_MAJOR)
IF(${DESIRED_QT_VERSION_MAJOR} EQUAL 4)
SET(USE_QT4 True)
ELSEIF(${DESIRED_QT_VERSION_MAJOR} EQUAL 5)
SET(USE_QT4 False)
ELSE()
MESSAGE(FATAL_ERROR "This package is only compatible with Qt 4 and Qt 5")
ENDIF()
MESSAGE(STATUS "Looking for Qt ${DESIRED_QT_VERSION_MAJOR}.")
SET(CMAKE_INCLUDE_CURRENT_DIR ON)
IF(USE_QT4)
FIND_PACKAGE(Qt4 REQUIRED QtCore QtGui QtOpenGl QtNetwork)
......@@ -44,8 +60,6 @@ ELSE(USE_QT4)
ENDFOREACH (component "Core" "Widgets" "Gui" "OpenGL" "Network")
ENDIF(USE_QT4)
ADD_REQUIRED_DEPENDENCY("gepetto-viewer-corba >= 1.3")
SET(BOOST_COMPONENTS thread regex)
SEARCH_FOR_BOOST ()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment